Fixed inadverdent trust level warning

This commit is contained in:
Mark Qvist 2024-03-02 09:11:09 +01:00
parent d9bba6fd69
commit f1989cfc6e

View File

@ -257,11 +257,12 @@ class Directory:
if announced_display_name == None:
return self.directory_entries[source_hash].trust_level
else:
for entry in self.directory_entries:
e = self.directory_entries[entry]
if e.display_name == announced_display_name:
if e.source_hash != source_hash:
return DirectoryEntry.WARNING
if not self.directory_entries[source_hash].trust_level == DirectoryEntry.TRUSTED:
for entry in self.directory_entries:
e = self.directory_entries[entry]
if e.display_name == announced_display_name:
if e.source_hash != source_hash:
return DirectoryEntry.WARNING
return self.directory_entries[source_hash].trust_level
else: