Fix NPE in changing the expiration of a tag

This commit is contained in:
Joseph Schorr 2018-11-02 14:54:13 -04:00
parent 417b3f9fc2
commit 4779e05f55
2 changed files with 8 additions and 1 deletions

View file

@ -895,7 +895,7 @@ def set_tag_end_ts(tag, end_ts):
""" Sets the end timestamp for a tag. Should only be called by change_tag_expiration
or tests.
"""
end_ms = end_ts * 1000
end_ms = end_ts * 1000 if end_ts is not None else None
with db_transaction():
# Note: We check not just the ID of the tag but also its lifetime_end_ts, to ensure that it has