mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-01-25 05:58:50 -06:00
Fixed all log_event() calls in app/routes/inventory.py that were incorrectly
passing dictionaries as positional arguments. The log_event() function signature
requires the event name as the first positional argument and all other data as
keyword arguments (via **kwargs).
Changed 19 calls from:
log_event('event_name', {'key': value}) # Wrong
To:
log_event('event_name', key=value) # Correct
This resolves the error 'log_event() takes 1 positional argument but 2 were
given' that occurred when creating or editing stock items and other inventory
operations.
Affected operations:
- Stock item create/update/delete
- Warehouse create/update/delete
- Stock movements, transfers, and adjustments
- Stock reservations
- Supplier create/update/delete
- Purchase order operations