Skip to content

Commit

Permalink
Delete instead of truncate (#143)
Browse files Browse the repository at this point in the history
* Change truncate to delete for QoS rules reset

* fix
  • Loading branch information
francesconazzaro authored Dec 6, 2024
1 parent c60c656 commit a68effb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cads_broker/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def get_events_from_request(

def reset_qos_rules(session: sa.orm.Session, qos):
"""Delete all QoS rules."""
session.execute(sa.text("truncate qos_rules cascade"))
session.execute(sa.text("delete from qos_rules cascade"))
# for rule in session.scalars(sa.select(QoSRule)):
# # rule.system_requests = []
# session.delete(rule)
Expand Down

0 comments on commit a68effb

Please sign in to comment.