File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 111.0.8
2+ - fix: if mimetype not available, check suffix for detecting DC data
23 - tests: own the docker image
341.0.7
45 - docs: rename shapeout to dcscope
Original file line number Diff line number Diff line change @@ -150,7 +150,16 @@ def dcserv(context, data_dict=None):
150150@functools .lru_cache (maxsize = 1024 )
151151def is_dc_resource (res_id ) -> bool :
152152 resource = model .Resource .get (res_id )
153- return resource .mimetype in DC_MIME_TYPES
153+ rs_name = resource .name
154+ is_dc = (
155+ # DCOR says this is a DC resource
156+ resource .mimetype in DC_MIME_TYPES
157+ # The suffix indicates that this is a DC resource
158+ # (in case ckanext-dcor_schemas has not yet updated the metadata)
159+ or (rs_name .count ("." )
160+ and rs_name .rsplit ("." , 1 )[- 1 ] in ["dc" , "rtdc" ])
161+ )
162+ return is_dc
154163
155164
156165def get_resource_basins_dicts_private (resource_id ):
You can’t perform that action at this time.
0 commit comments