diff --git a/ereuse_devicehub/inventory/views.py b/ereuse_devicehub/inventory/views.py index b70b7cc4..684be46f 100644 --- a/ereuse_devicehub/inventory/views.py +++ b/ereuse_devicehub/inventory/views.py @@ -654,7 +654,7 @@ class NewActionView(View): if lot_id: return url_for('inventory.lotdevicelist', lot_id=lot_id) - if url_for('inventory.alldevicelist') in request.referrer: + if url_for('inventory.alldevicelist') in (request.referrer or ''): return url_for('inventory.alldevicelist') return url_for('inventory.devicelist')