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:
parent
690672580e
commit
03c2286232
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user