Skip to content

Commit

Permalink
Merge pull request #596 from furlongm/attrs-parsing
Browse files Browse the repository at this point in the history
better handle attrs in reports
  • Loading branch information
furlongm authored Jun 23, 2024
2 parents 0580e9b + 61f9cd8 commit 5107b64
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions reports/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,12 @@ def parse(self, data, meta):
'reboot']

for attr in attrs:
setattr(self, attr, data.get(attr).strip())
if data.get(attr):
setattr(self, attr, data.get(attr))
else:
setattr(self, attr, '')

if self.host is not None:
if self.host:
self.host = self.host.lower()
fqdn = self.host.split('.', 1)
if len(fqdn) == 2:
Expand Down

0 comments on commit 5107b64

Please sign in to comment.