You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2022/09/14 18:22:23 UTC
[allura] 05/07: [#8461] index (unique) on OAuthConsumerToken.api_key
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch db/8461
in repository https://gitbox.apache.org/repos/asf/allura.git
commit 385be59f88c37ea7fa03f1f89ec2f5247520e2fc
Author: Dave Brondsema <db...@slashdotmedia.com>
AuthorDate: Thu Sep 8 11:31:44 2022 -0400
[#8461] index (unique) on OAuthConsumerToken.api_key
---
Allura/allura/model/oauth.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Allura/allura/model/oauth.py b/Allura/allura/model/oauth.py
index a5e390ff0..72f31f7e6 100644
--- a/Allura/allura/model/oauth.py
+++ b/Allura/allura/model/oauth.py
@@ -72,7 +72,10 @@ class OAuthConsumerToken(OAuthToken):
class __mongometa__:
polymorphic_identity = 'consumer'
name = 'oauth_consumer_token'
- unique_indexes = [('name', 'user_id')]
+ unique_indexes = [
+ ('name', 'user_id'),
+ ('api_key',),
+ ]
query: 'Query[OAuthConsumerToken]'