src/apps/orders/admin/promocodes/admin.py
Merge this if statement with the enclosing one. Open
Open
if obj.expires is None or obj.expires >= timezone.now():
- Read upRead up
- Exclude checks
Merging collapsible if
statements increases the code's readability.
Noncompliant Code Example
if condition1: if condition2: # ...
Compliant Solution
if condition1 and condition2: # ...