Skip to content

Commit b47eb23

Browse files
authored
Update models.py
1 parent 6853e21 commit b47eb23

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

models.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -333,13 +333,8 @@ def full_name(self):
333333
An Authoring Tool has at least a name; company and version are optional.
334334
"""
335335

336-
company_name = self.company.name if self.company else ''
337-
full_name_without_version = f'{company_name} {self.name}'.strip()
338-
339-
if self.version is None:
340-
return full_name_without_version
341-
else:
342-
return f'{full_name_without_version} - {self.version}'.strip()
336+
full_name_without_version = f'{company_name} - {self.name}'.strip() if self.company else f'{self.name}'.strip()
337+
return f'{full_name_without_version} - {self.version}'.strip() self.version else full_name_without_version
343338

344339
def find_by_full_name(full_name):
345340
"""

0 commit comments

Comments
 (0)