app/soc/modules/ghop/views/helper/access.py
changeset 2958 0f42428b7163
parent 2922 6e373954bbf6
child 3066 45e2c3e70761
equal deleted inserted replaced
2957:f6515daaf000 2958:0f42428b7163
   119       fields = {'scope': org_entity}
   119       fields = {'scope': org_entity}
   120       task_query = ghop_task_logic.logic.getQueryForFields(fields)
   120       task_query = ghop_task_logic.logic.getQueryForFields(fields)
   121 
   121 
   122       if task_query.count() >= org_entity.task_quota_limit:
   122       if task_query.count() >= org_entity.task_quota_limit:
   123         # too many tasks access denied
   123         # too many tasks access denied
   124         raise out_of_band.AccessViolation(message_fmt=DEF_MAX_TASKS_REACHED)
   124         raise out_of_band.AccessViolation(message_fmt=DEF_MAX_TASKS_REACHED_MSG)
   125 
   125 
   126     if 'link_id' in django_args:
   126     if 'link_id' in django_args:
   127       task_filter = {
   127       task_filter = {
   128           'link_id': django_args['link_id'],
   128           'link_id': django_args['link_id'],
   129           'scope_path': django_args['scope_path'],
   129           'scope_path': django_args['scope_path'],