Added name kwarg to Column(Enum(...)) in OAuth models
authorJoar Wandborg <git@wandborg.com>
Fri, 21 Sep 2012 11:20:56 +0000 (13:20 +0200)
committerJoar Wandborg <git@wandborg.com>
Fri, 21 Sep 2012 11:20:56 +0000 (13:20 +0200)
mediagoblin/plugins/oauth/models.py

index 91bd0fc63778ae137acf6dd06f7aa068d2c8fd39..7e247c1a6f9258cc98bfd133e476cff695d866d0 100644 (file)
@@ -51,7 +51,8 @@ class OAuthClient(Base):
 
     type = Column(Enum(
         u'confidential',
-        u'public'))
+        u'public',
+        name=u'oauth__client_type'))
 
     def generate_identifier(self):
         self.identifier = unicode(uuid.uuid4())
@@ -82,7 +83,8 @@ class OAuthUserClient(Base):
 
     state = Column(Enum(
         u'approved',
-        u'rejected'))
+        u'rejected',
+        name=u'oauth__relation_state'))
 
     def __repr__(self):
         return '<{0} #{1} {2} [{3}, {4}]>'.format(