Support .get(fieldname) on sql db objects
Some parts of the code like to call .get("somefield") on
the db objects. It's easy to support this on sqlalchemy
based objects, so lets do it.
This commit is contained in:
@@ -25,3 +25,6 @@ class GMGTableBase(object):
|
||||
@classmethod
|
||||
def one(cls, query_dict):
|
||||
return cls.find(query_dict).one()
|
||||
|
||||
def get(self, key):
|
||||
return getattr(self, key)
|
||||
|
||||
Reference in New Issue
Block a user