Commit 611b9910 authored by Alexander Detsch's avatar Alexander Detsch 🐘
Browse files

fix adding aps to wiki that didn't exist there already before

parent fabc4506
......@@ -121,8 +121,17 @@ class WarehouseWikipage:
if not self.aps:
self.__generate_wiki_warehouse_data()
self.aps[ap_data.serial]['Hostname'] = ap_data.name
self.aps[ap_data.serial]['Ort'] = f"{ap_data.site}, Zi. {ap_data.location}"
if ap_data.serial in self.aps:
self.aps[ap_data.serial]['Hostname'] = ap_data.name
self.aps[ap_data.serial]['Ort'] = f"{ap_data.site}, Zi. {ap_data.location}"
else:
ap = {}
ap['Hostname'] = ap_data.name
ap['Ort'] = f"{ap_data.site}, Zi. {ap_data.location}"
ap['Seriennummer'] = ap_data.serial
ap['MAC-Adresse'] = ap_data.mac
ap['Typ'] = ap_data.model
self.aps[ap_data.serial] = ap
def upload_to_wiki(self):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment