1
0
Fork 0
forked from gitea/nas

Fix expiration unit bug

This commit is contained in:
KMY 2023-03-21 13:02:22 +09:00
parent 16965de945
commit a1284940eb
3 changed files with 8 additions and 4 deletions

View file

@ -30,7 +30,6 @@ class UpdateStatusService < BaseService
update_media_attachments! if @options.key?(:media_ids)
update_poll! if @options.key?(:poll)
update_immediate_attributes!
update_expiration!
create_edit! unless @options[:no_history]
end
@ -118,6 +117,8 @@ class UpdateStatusService < BaseService
# We raise here to rollback the entire transaction
raise NoChangesSubmittedError unless significant_changes?
update_expiration!
@status.edited_at = Time.now.utc
@status.save!