Skip to content

Commit

Permalink
persist opt-out change
Browse files Browse the repository at this point in the history
  • Loading branch information
pbugni committed Mar 21, 2024
1 parent fbca113 commit 1055358
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions portal/trigger_states/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from .empro_states import extract_observations, users_trigger_state
from .models import TriggerState
from ..database import db
from ..extensions import oauth
from ..models.role import ROLE
from ..models.user import get_user
Expand Down Expand Up @@ -76,6 +77,8 @@ def opt_out(user_id):
except ValueError as e:
abort(400, str(e))

# persist the change
db.session.commit()
return jsonify(ts.as_json())


Expand Down

0 comments on commit 1055358

Please sign in to comment.