diff options
author | Andreas Brandl <abrandl@gitlab.com> | 2019-01-02 16:05:40 +0100 |
---|---|---|
committer | Andreas Brandl <abrandl@gitlab.com> | 2019-01-29 15:38:40 +0100 |
commit | 852e68fd952b18ba32b87c165bb17c370965d756 (patch) | |
tree | 3aea29b3ec0f8b138738b28885f1794ea7d40eac /app | |
parent | fda30abdb2a88f360b20f99f3cefe0850d4e9f18 (diff) | |
download | gitlab-ce-852e68fd952b18ba32b87c165bb17c370965d756.tar.gz |
Revert "Trigger iid logic from GitHub importer for milestones."
This reverts commit 358675d09f6ba0fdcc4a089c6d1da6df9ff6d092.
Diffstat (limited to 'app')
-rw-r--r-- | app/models/internal_id.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/internal_id.rb b/app/models/internal_id.rb index e7168d49db9..4eb211eff61 100644 --- a/app/models/internal_id.rb +++ b/app/models/internal_id.rb @@ -111,7 +111,7 @@ class InternalId < ActiveRecord::Base # Generates next internal id and returns it def generate - InternalId.transaction do + subject.transaction do # Create a record in internal_ids if one does not yet exist # and increment its last value # @@ -125,7 +125,7 @@ class InternalId < ActiveRecord::Base # # Note this will acquire a ROW SHARE lock on the InternalId record def track_greatest(new_value) - InternalId.transaction do + subject.transaction do (lookup || create_record).track_greatest_and_save!(new_value) end end @@ -148,7 +148,7 @@ class InternalId < ActiveRecord::Base # violation. We can safely roll-back the nested transaction and perform # a lookup instead to retrieve the record. def create_record - InternalId.transaction(requires_new: true) do + subject.transaction(requires_new: true) do InternalId.create!( **scope, usage: usage_value, |