default sdesc is key

This commit is contained in:
InspectorCaracal 2022-04-15 14:56:59 -06:00 committed by GitHub
parent 2418594742
commit f1b329c1be

View file

@ -691,7 +691,7 @@ class SdescHandler:
""" """
Cache data from storage Cache data from storage
""" """
self.sdesc = self.obj.attributes.get("_sdesc", default="") self.sdesc = self.obj.attributes.get("_sdesc", default=obj.key)
sdesc_regex = self.obj.attributes.get("_sdesc_regex", default="") sdesc_regex = self.obj.attributes.get("_sdesc_regex", default="")
if not sdesc_regex: if not sdesc_regex:
permutation_string = " ".join([self.key] + self.aliases.all()) permutation_string = " ".join([self.key] + self.aliases.all())