Skip to content

Commit

Permalink
Merge pull request #749 from sparc-request/kg-ssr_id_bug
Browse files Browse the repository at this point in the history
KG - next_ssr_id Bug Fix
  • Loading branch information
jleonardw9 committed Nov 22, 2016
2 parents bd577d6 + 5987c54 commit 1074e4b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/service_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,8 @@ def ensure_ssr_ids
ssr.update_attributes(ssr_id: "%04d" % next_ssr_id)
next_ssr_id += 1
end
# If we have created a protocol, we don't want to ensure that the ssr_ids are sequential because the user may remove SSRs
next_ssr_id += 1 unless self.protocol
end

self.protocol.update_attributes(next_ssr_id: next_ssr_id) if self.protocol
Expand Down

0 comments on commit 1074e4b

Please sign in to comment.