vipyrsec / dragonfly-mainframe

The mainframe for Dragonfly
https://docs.vipyrsec.com/dragonfly-mainframe/
MIT License
5 stars 1 forks source link

Fix bug where rules were not going into DB #81

Closed Robin5605 closed 1 year ago

Robin5605 commented 1 year ago

Closes #80

Apparently ScalarResult objects are exhaustible iterators, and the {rule.name for rule in rules} line was exhausting it before it could be added into the database. Using .all() converts the ScalarResult[T] into Sequence[T]