diff options
| author | jpl | 2017-07-18 14:06:12 +0200 |
|---|---|---|
| committer | Xinhui | 2017-07-18 14:53:45 +0200 |
| commit | d7cd5400a4910be4e21e812b2261f45d86537daf (patch) | |
| tree | 749064c393bfa53a97049680455bd8cdb47a3ea8 | |
| parent | 637fb8557d4bcd183d890607ae51792a5bcc1ecc (diff) | |
| download | chouette-core-d7cd5400a4910be4e21e812b2261f45d86537daf.tar.bz2 | |
Tmp fix build_objectid update objectid without validation
Refs #4092
| -rw-r--r-- | app/models/concerns/default_attributes_support.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/concerns/default_attributes_support.rb b/app/models/concerns/default_attributes_support.rb index 7928093e6..81d9dccd4 100644 --- a/app/models/concerns/default_attributes_support.rb +++ b/app/models/concerns/default_attributes_support.rb @@ -77,7 +77,9 @@ module DefaultAttributesSupport def build_objectid if objectid.include? ':__pending_id__' fix_uniq_objectid - update_attributes( :objectid => objectid, :object_version => (object_version - 1) ) + self.objectid = objectid + self.object_version = object_version - 1 + self.save(validate: false) end end |
