Commit abdf1858 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

quotaholder: Delete unused helper functions

parent 05c866cc
......@@ -110,36 +110,3 @@ class ProvisionLog(Model):
reason = CharField(max_length=4096)
objects = ForUpdateManager()
def _get(*args, **kwargs):
model = args[0]
args = args[1:]
o = model.objects
for_update = kwargs.pop('for_update', False)
f = o.get_for_update if for_update else o.get
return f(*args, **kwargs)
def _filter(*args, **kwargs):
model = args[0]
args = args[1:]
o = model.objects
for_update = kwargs.pop('for_update', False)
q = o.filter(*args, **kwargs)
q = q.select_for_update() if for_update else q
return q
def db_get_holding(*args, **kwargs):
return _get(Holding, *args, **kwargs)
def db_get_commission(*args, **kwargs):
return _get(Commission, *args, **kwargs)
def db_filter_provision(*args, **kwargs):
return _filter(Provision, *args, **kwargs)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment