You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create three Record Groups for the new Organization. DO NOT create any jobs for these new Record Groups.
Go to the http://servername/combine page. Click on the new Organization's hyperlink. You will see the error:
Sorry! Something went wrong. Please contact your administrator.
<class 'ValueError'> at 2021-02-25 22:50:43.683102+00:00 with args ('max() arg is an empty sequence',): max() arg is an empty sequence
One-by-one, update the Record Groups, adding jobs for them. After adding each job, try to load the page again, and note that it continues to throw the error until ALL of the Record Groups have an associated job.
I tracked this to the /opt/combine-docker/combine/combine/core/models/record_group.py file:
123 @property
124 def last_modified(self):
125 jobs = self.job_set.all()
126 timestamps = [job.timestamp for job in jobs]
127 return max(timestamps)
I changed the above code to:
123 @property
124 def last_modified(self):
125 jobs = self.job_set.all()
126 timestamps = [job.timestamp for job in jobs]
127 try:
128 return max(timestamps)
129 except ValueError:
130 print("failed due to no jobs for record_group")
...and the page stopped throwing an error.
There are doubtless better ways to solve the problem, but that ID's the trigger for it, at least.
The text was updated successfully, but these errors were encountered:
To repro:
I tracked this to the /opt/combine-docker/combine/combine/core/models/record_group.py file:
I changed the above code to:
...and the page stopped throwing an error.
There are doubtless better ways to solve the problem, but that ID's the trigger for it, at least.
The text was updated successfully, but these errors were encountered: