Fixed #477: Only re-save session if it's not empty

This commit is contained in:
Andrew Godwin 2017-01-24 09:51:42 -08:00
parent 5c74ee587e
commit db8a4570c3

View File

@ -70,7 +70,7 @@ def channel_session(func):
return func(message, *args, **kwargs)
finally:
# Persist session if needed
if session.modified:
if session.modified and not session.is_empty():
session.save()
return inner