Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Bug 992464 - Authorization token needs to raise when checking eventual consistency #3290

Conversation

smarterclayton
Copy link
Contributor

Was using .first which returns nil

@abhgupta review please

…l consistency

Was using .first which returns nil
@@ -44,7 +44,7 @@ class Authorization
scope :not_expired, lambda{ where(:expires_at.gt => DateTime.now, :revoked_at => nil) }

def self.authenticate(token)
with(consistency: :eventual).where(token: token).first
with(consistency: :eventual).where(token: token).find_by
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use --> with(consistency: :eventual).find_by(token: token)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be consistent with the rescue block

@abhgupta
Copy link
Member

[merge] reviewed.

@openshift-bot
Copy link

Online Merge Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/merge_pull_requests/3425/) (Image: devenv_3644)

@openshift-bot
Copy link

Evaluated for online up to 340e910

@openshift-bot
Copy link

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link

Origin Test Results: SUCCESS (https://originci-openshift.rhcloud.com/job/test_pull_requests/1651/)

@openshift-bot
Copy link

Evaluated for origin up to 340e910

@openshift-bot
Copy link

openshift-bot pushed a commit that referenced this pull request Aug 13, 2013
…n_not_found_token

Merged by openshift-bot
@openshift-bot openshift-bot merged commit 01b1f09 into openshift:master Aug 13, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants