Revision 30edd93d snf-astakos-app/astakos/quotaholder_app/callpoint.py
b/snf-astakos-app/astakos/quotaholder_app/callpoint.py | ||
---|---|---|
124 | 124 |
Holding.objects.bulk_create(new_holdings.values()) |
125 | 125 |
|
126 | 126 |
|
127 |
def add_resource_limit(holders=None, sources=None, resources=None, diff=0): |
|
128 |
holdings = Holding.objects.all() |
|
129 |
|
|
130 |
if holders is not None: |
|
131 |
holdings = holdings.filter(holder__in=holders) |
|
132 |
|
|
133 |
if sources is not None: |
|
134 |
holdings = holdings.filter(source__in=sources) |
|
135 |
|
|
136 |
if resources is not None: |
|
137 |
holdings = holdings.filter(resource__in=resources) |
|
138 |
|
|
139 |
holdings.update(limit=F('limit')+diff) |
|
140 |
|
|
141 |
|
|
142 | 127 |
def issue_commission(clientkey, provisions, name="", force=False): |
143 | 128 |
operations = Operations() |
144 | 129 |
provisions_to_create = [] |
Also available in: Unified diff