Skip to content

Commit

Permalink
[api] fix ruby syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Jun 5, 2013
1 parent dc06450 commit 674c04a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/app/models/bs_request.rb
Expand Up @@ -28,10 +28,10 @@ class SaveError < APIException
after_update :send_state_change

def check_supersede_state
if self.state == :superseded && ( not self.superseded_by.is_a? Numeric || not self.superseded_by > 0 )
if self.state == :superseded and ( not self.superseded_by.is_a?(Numeric) or not self.superseded_by > 0 )
errors.add(:superseded_by, 'Superseded_by should be set')
end
if self.superseded_by && self.state != :superseded
if self.superseded_by and not self.state == :superseded
errors.add(:superseded_by, 'Superseded_by should not be set')
end
end
Expand Down

0 comments on commit 674c04a

Please sign in to comment.