Skip to content

Commit

Permalink
Use applicant info when assignee details missing
Browse files Browse the repository at this point in the history
  • Loading branch information
mahesh-maan committed Apr 18, 2024
1 parent 6d09519 commit c30ec1e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions core/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@ def www_link (self):
@property
def owner (self):
if self.type == 'patent':
if not self.data.get('assignees'):
return 'Assignee N/A'
elif not self.data.get('assignees')[0].strip():
return 'Assignee N/A'
else:
return self.data['assignees'][0]
arr = self.data.get('assignees')
if (isinstance(arr, list) and len(arr) and arr[0].strip()):
return arr[0]
arr = self.data.get('applicants')
if (isinstance(arr, list) and len(arr) and arr[0].strip()):
return arr[0]
return 'Assignee N/A'
elif self.type == 'npl':
if not self.data['authors']:
return 'Author N/A'
Expand Down

0 comments on commit c30ec1e

Please sign in to comment.