| Conditions | 5 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | from flask.ext.sqlalchemy import SQLAlchemy |
||
| 22 | def get_latest_sid(): # FIXME I'm ugly as fuck |
||
| 23 | latest = NaxsiRules.query.order_by(NaxsiRules.sid.desc()).first() |
||
| 24 | if latest is None: |
||
| 25 | latest = Settings.query.filter(Settings.name == "rules_offset").first() |
||
| 26 | return int(latest.value) + 1 |
||
| 27 | return latest.sid + 1 |
||
| 28 |