Skip to content

Commit 4c5516b

Browse files
committed
Fixed indent level of if-block in '_check_notifications'
1 parent 1dbf167 commit 4c5516b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/murfey/workflows/spa/picking.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,14 +354,14 @@ def _check_notifications(message: dict, murfey_db: Session) -> None:
354354
).all()
355355
failures = []
356356
for param in notification_parameters:
357-
param_value_to_drop = None
358357
if message.get(param.name) is not None:
359358
param_values = murfey_db.exec(
360359
select(NotificationValue).where(
361360
NotificationValue.notification_parameter_id == param.id
362361
)
363362
).all()
364363
param_values.sort(ley=lambda x: x.index)
364+
param_value_to_drop = None
365365
if len(param_values) >= 25:
366366
param_value_to_drop = param_values[0]
367367
param_values = param_values[1:]
@@ -388,9 +388,9 @@ def _check_notifications(message: dict, murfey_db: Session) -> None:
388388
else:
389389
if param.notification_active:
390390
param.notification_active = False
391-
if param_value_to_drop is not None:
392-
murfey_db.delete(param_value_to_drop)
393-
murfey_db.add(param_values[-1])
391+
if param_value_to_drop is not None:
392+
murfey_db.delete(param_value_to_drop)
393+
murfey_db.add(param_values[-1])
394394
murfey_db.add_all(notification_parameters)
395395
murfey_db.commit()
396396
murfey_db.close()

0 commit comments

Comments
 (0)