From 012718f0fd2c0439f8f2b44c0668b511c58ec0e0 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Mon, 13 Jul 2026 11:12:03 -0400 Subject: [PATCH] Import-API: preserve app-version timestamps in import mode POST /api/applications/{id}/versions now calls apply_import_timestamps so an imported version's original dateadded/releasedate survives (was skipped, unlike the app + install endpoints). No-op outside import mode. Co-Authored-By: Claude Opus 4.8 --- shopdb/core/api/applications.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shopdb/core/api/applications.py b/shopdb/core/api/applications.py index 58589e9..ed0c05d 100644 --- a/shopdb/core/api/applications.py +++ b/shopdb/core/api/applications.py @@ -271,6 +271,9 @@ def create_version(app_id: int): ) db.session.add(version) + # Preserve the legacy release/added timestamps in import mode (no-op + # otherwise), so imported version history keeps its original dates. + apply_import_timestamps(version, data) db.session.commit() return success_response(version.to_dict(), message='Version created', http_code=201)