diff --git a/toardb/timeseries/crud.py b/toardb/timeseries/crud.py index 7105143d525ff96d1461e02de8fb064181f3c505..3e3c792b3091d1ea398bddc0555ec90c484c38b8 100644 --- a/toardb/timeseries/crud.py +++ b/toardb/timeseries/crud.py @@ -305,6 +305,11 @@ def get_timeseries_by_unique_constraints(db: Session, station_id: int, variable_ Criterion 14.9: data filtering procedures or other special dataset identifiers (use database field 'label') """ +# print("in get_timeseries_by_unique_constraints") +# print(f"station_id: {station_id}, variable_id: {variable_id}, resource_provider: {resource_provider}, ", \ +# f"sampling_frequency: {sampling_frequency}, provider_version: {provider_version}, data_origin_type: {data_origin_type}, ", \ +# f"data_origin: {sampling_frequency}, sampling_height: {sampling_height}, label: {label}") + # filter for criterion 14.1 and 14.2 ret_db_object = db.query(models.Timeseries).filter(models.Timeseries.station_id == station_id) \ .filter(models.Timeseries.variable_id == variable_id).all() @@ -326,7 +331,7 @@ def get_timeseries_by_unique_constraints(db: Session, station_id: int, variable_ for role in db_object.roles: # resource provider is always an organisation! organisation = get_contact(db, contact_id=role.contact_id) - if ((organisation.longname == resource_provider) and (role_num == role.role)): + if ((role_num == role.role) and (organisation.longname == resource_provider)): found = True if not found: ret_db_object.pop(counter)