simplifying conditions at check_quota function
mdegis opened this issue · comments
check_quota function has some if statement(s?) that can be remove (to improve readiblity, without breaking the code) I guess 🤔
For example, at the second part:
if departmentQuota['department'] == department:
if departmentQuota['current'] < departmentQuota['quota']:
return True
else:
return False
Instead of checking if it is true and returning true, this statement can be removed and can be re-written as
if departmentQuota['department'] == department:
return departmentQuota['current'] < departmentQuota['quota']:
Note: I think also the other conditions at this function might be simplified by using the same method but not so sure 😅