Skip to content

Commit b7c0c65

Browse files
Robin-Rheeosmith42
andauthored
Update lib/database.py
fine-tune a comment Co-authored-by: Oliver Smith <osmith@sysmocom.de>
1 parent 9975178 commit b7c0c65

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ def log_change(self, session, item_id, operation, changes, table_name, operation
525525
# Combine all changes into a single string with their types
526526
changes_string = '\r\n\r\n'.join(f"{column_name}: [{type(old_value).__name__}] {old_value} ----> [{type(new_value).__name__}] {new_value}" for column_name, old_value, new_value in changes)
527527

528-
# Do not use the nasty "or" expression
528+
# Do not use the nasty "or" expression, item_id may be 0
529529
if item_id is None:
530530
item_id = generated_id
531531

0 commit comments

Comments
 (0)