You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a BaseService class that defines the __init__ method. Maybe combine with ChunkQueryMixin...
Remove ms_object_to_model in favor of a modelKlass property on each service so ms_object_to_model can be defined in the BaseService and simply use self.modelKlass(sane_obj). This requires separate services for separate models, unlike the combined Org and OrgType ones now.
Clean up request_session() calls:
Move
if not self.client.session_id:
self.client.request_session()
into __init__ and out of access methods... ConciergeClient.__init__() or BaseService.__init__() as appropriate.
Add a shared method for query parameter handling to the BaseService for:
if where_params:
query += " WHERE "
query += " AND ".join(
["%s %s %s" % (p[0], p[1], p[2]) for p in where_params])
Add a
BaseServiceclass that defines the__init__method. Maybe combine with ChunkQueryMixin...Remove
ms_object_to_modelin favor of amodelKlassproperty on each service soms_object_to_modelcan be defined in theBaseServiceand simply useself.modelKlass(sane_obj). This requires separate services for separate models, unlike the combined Org and OrgType ones now.Clean up
request_session()calls:Move
into
__init__and out of access methods...ConciergeClient.__init__()orBaseService.__init__()as appropriate.Add a shared method for query parameter handling to the
BaseServicefor: