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;")