diff --git a/app/cdclient.py b/app/cdclient.py index 54aa2f2..13bfea8 100644 --- a/app/cdclient.py +++ b/app/cdclient.py @@ -3096,7 +3096,7 @@ class MissionText(db.Model): nullable=False ) - Icon = db.relationship("Icons") + Icon = db.relationship("Icons", foreign_keys=[IconID]) state_1_anim = db.Column( sqlite.TEXT(), @@ -3224,7 +3224,7 @@ class MissionText(db.Model): nullable=False ) - turnInIcon = db.relationship("Icons") + turnInIcon = db.relationship("Icons", foreign_keys=[turnInIconID]) localize = db.Column( sqlite.BOOLEAN(), diff --git a/app/luclient.py b/app/luclient.py index e15d59c..3bf9517 100644 --- a/app/luclient.py +++ b/app/luclient.py @@ -225,7 +225,9 @@ def get_lot_name(lot_id): if name == f'Objects_{lot_id}_name': intermed = Objects.query.filter(Objects.id == lot_id).first() if intermed: - name = intermed.displayName if (intermed.displayName != "None" and intermed.displayName != "" and intermed.displayName is None) else intermed.name + name = intermed.displayName if (intermed.displayName != "None" or intermed.displayName != "" or intermed.displayName == None) else intermed.name + if not name: + name = f'Objects_{lot_id}_name' return name diff --git a/app/properties.py b/app/properties.py index 8646c64..7fc64e8 100644 --- a/app/properties.py +++ b/app/properties.py @@ -204,7 +204,7 @@ def get(status="all"): rowTable = DataTables(params, query, columns) data = rowTable.output_result() - print(data) + for property_data in data["data"]: id = property_data["0"] @@ -246,7 +246,7 @@ def get(status="all"): if property_data["4"] == "": property_data["4"] = ZoneTable.query.filter( - ZoneTable.zoneID == property_data.zone_id + ZoneTable.zoneID == property_data["13"] ).first().DisplayDescription if property_data["6"] == 0: @@ -265,7 +265,7 @@ def get(status="all"): property_data["7"] = '''
''' property_data["13"] = ZoneTable.query.filter( - ZoneTable.zoneID == property_data.zone_id + ZoneTable.zoneID == property_data["13"] ).first().DisplayDescription return data