Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
scope signing key read to selected realm (#398)
Browse files Browse the repository at this point in the history
* scope signing key read to selected realm

* remove unnecessary Model scope
  • Loading branch information
mikehelmick authored Aug 27, 2020
1 parent 29f624e commit 7ecefed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/database/realm.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ func (r *Realm) SMSProvider(db *Database) (sms.Provider, error) {
func (r *Realm) GetCurrentSigningKey(db *Database) (*SigningKey, error) {
var signingKey SigningKey
if err := db.db.
Model(r).
Where("realm_id = ?", r.ID).
Where("active = ?", true).
Order("signing_keys.created_at DESC").
First(&signingKey).
Expand Down

0 comments on commit 7ecefed

Please sign in to comment.