mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
feat: Add null check for hostname in Database.py
A null check for the "hostname" field has been added in the Database.py file. This ensures that instances without a hostname are skipped during processing, improving the reliability of the code.
This commit is contained in:
parent
ffaaf503a0
commit
ea1ef434e2
1 changed files with 3 additions and 0 deletions
|
|
@ -3106,6 +3106,9 @@ class Database:
|
|||
session.query(Instances).filter(Instances.method == method).delete()
|
||||
|
||||
for instance in instances:
|
||||
if instance.get("hostname") is None:
|
||||
continue
|
||||
|
||||
to_put.append(
|
||||
Instances(
|
||||
hostname=instance["hostname"],
|
||||
|
|
|
|||
Loading…
Reference in a new issue