-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement domain statuses restore after domain locked, added test #1902
implement domain statuses restore after domain locked, added test #1902
Conversation
@@ -1,6 +1,8 @@ | |||
module Domain::RegistryLockable | |||
extend ActiveSupport::Concern | |||
|
|||
# status_notes public.hstore, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not needed here
@@ -9,6 +11,12 @@ def apply_registry_lock | |||
return unless registry_lockable? | |||
return if locked_by_registrant? | |||
|
|||
self.locked_domain_statuses_history = self.statuses.map do |status| | |||
if LOCK_STATUSES.include? status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about single-liner here?
Like status if LOCK_STATUSES.include? status
@@ -36,7 +44,9 @@ def remove_registry_lock | |||
|
|||
transaction do | |||
LOCK_STATUSES.each do |domain_status| | |||
statuses.delete(domain_status) | |||
unless self.locked_domain_statuses_history.include? domain_status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and another single-liner here
14331f9
to
80fb106
Compare
80fb106
to
9bfdb0f
Compare
ce49c01
to
3ff840f
Compare
3ff840f
to
da31721
Compare
Issue
|
2edeb48
to
3985513
Compare
23794cd
to
9c0018d
Compare
f468686
to
aa4bb5a
Compare
aa4bb5a
to
441a191
Compare
PR was reverted due to high amount of DB load on data migrations.
|
Close #1900