mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 11:52:01 +00:00
models: Migration of Message.pub_date to date_sent, part 2.
Fixes #1727. With the server down, apply migrations 0245 and 0246. 0246 will remove the pub_date column, so it's essential that the previous migrations ran correctly to copy data before running this.
This commit is contained in:
committed by
Tim Abbott
parent
f198475281
commit
dbe508bb91
@@ -59,7 +59,7 @@ def sent_time_in_epoch_seconds(user_message: Optional[UserMessage]) -> Optional[
|
||||
return None
|
||||
# We have USE_TZ = True, so our datetime objects are timezone-aware.
|
||||
# Return the epoch seconds in UTC.
|
||||
return calendar.timegm(user_message.message.pub_date.utctimetuple())
|
||||
return calendar.timegm(user_message.message.date_sent.utctimetuple())
|
||||
|
||||
def get_bot_types(user_profile: UserProfile) -> List[Dict[str, object]]:
|
||||
bot_types = []
|
||||
|
||||
Reference in New Issue
Block a user