retoor d4a26d730d fix: ensure dict data is JSON-serializable before inserting into database
The diff shows a change in `src/metriki/app.py` within the `BaseView.insert` method. The original code directly passed `dict(data)` to the database insert, which could fail if `data` contains non-serializable types like `datetime` objects. The fix converts the data to a JSON string and back using `json.loads(json.dumps(data))`, ensuring all values are plain Python types (strings, numbers, lists, dicts) before insertion. This prevents serialization errors when the database backend expects JSON-compatible data.
2025-01-02 19:40:21 +00:00

Metriki

Description

System for advanced metrics.

S
Description
Metrics application for web applications
Readme
113 KiB
Languages
Python 65.9%
JavaScript 29.6%
Makefile 3%
HTML 1.5%