From f6c332cdbf2ccb10ebe960d445e2172c79922065 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 8 Apr 2022 17:05:50 +0200 Subject: [PATCH] fix bug --- ereuse_devicehub/inventory/forms.py | 2 +- .../migrations/versions/23d9e7ebbd7d_add_snapshot_errors.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index f99f48a7..206cf68b 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -282,7 +282,7 @@ class UploadSnapshotForm(FlaskForm, SnapshotMix): if commit: db.session.commit() - return response + return self.result class NewDeviceForm(FlaskForm): diff --git a/ereuse_devicehub/migrations/versions/23d9e7ebbd7d_add_snapshot_errors.py b/ereuse_devicehub/migrations/versions/23d9e7ebbd7d_add_snapshot_errors.py index c51de914..308f6a86 100644 --- a/ereuse_devicehub/migrations/versions/23d9e7ebbd7d_add_snapshot_errors.py +++ b/ereuse_devicehub/migrations/versions/23d9e7ebbd7d_add_snapshot_errors.py @@ -48,7 +48,9 @@ def upgrade(): sa.PrimaryKeyConstraint('id'), schema=f'{get_inv()}', ) + op.execute(f"CREATE SEQUENCE {get_inv()}.snapshot_errors_seq START 1;") def downgrade(): op.drop_table('snapshot_errors', schema=f'{get_inv()}') + op.execute(f"DROP SEQUENCE {get_inv()}.snapshot_errors_seq;")