Skip to content

Commit 9dbc3e6

Browse files
authored
Merge pull request #31 from buildingSMART/rw-bsi-patch-1
IVS-412 - Change string representation of Authoring Tool
2 parents c60e3db + b89f1e3 commit 9dbc3e6

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
@@ -317,13 +317,8 @@ def full_name(self):
317317
An Authoring Tool has at least a name; company and version are optional.
318318
"""
319319

320-
company_name = self.company.name if self.company else ''
321-
full_name_without_version = f'{company_name} {self.name}'.strip()
322-
323-
if self.version is None:
324-
return full_name_without_version
325-
else:
326-
return f'{full_name_without_version} - {self.version}'.strip()
320+
full_name_without_version = f'{company_name} - {self.name}'.strip() if self.company else f'{self.name}'.strip()
321+
return f'{full_name_without_version} - {self.version}'.strip() self.version else full_name_without_version
327322

328323
def find_by_full_name(full_name):
329324
"""

0 commit comments

Comments
 (0)