File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
backend/application/import_observations/api Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -280,16 +280,17 @@ def _get_product_branch_by_name(request_serializer: Serializer) -> tuple[Product
280280 branch = Branch .objects .create (
281281 product = product , name = branch_name , is_default_branch = branch_name .endswith ("0.0.0-dev-amd64" )
282282 )
283- digest = subprocess .check_output (
284- "crane digest oci.stackable.tech/sdp/" + branch .product .name + ":" + branch .name ,
285- shell = True ,
286- ).rstrip ()
287- arch = branch .name .split ("-" )[- 1 ]
288- branch .purl = (
289- f"pkg:oci/{ branch .product .name } @{ urllib .parse .quote_plus (digest )} "
290- f"?arch={ arch } &repository_url=oci.stackable.tech%2Fsdp%2F{ branch .product .name } "
291- )
292- branch .save ()
283+ if product .product_group .name in ["SDP Operators" , "SDP Products" ]:
284+ digest = subprocess .check_output (
285+ "crane digest oci.stackable.tech/sdp/" + branch .product .name + ":" + branch .name ,
286+ shell = True ,
287+ ).rstrip ()
288+ arch = branch .name .split ("-" )[- 1 ]
289+ branch .purl = (
290+ f"pkg:oci/{ branch .product .name } @{ urllib .parse .quote_plus (digest )} "
291+ f"?arch={ arch } &repository_url=oci.stackable.tech%2Fsdp%2F{ branch .product .name } "
292+ )
293+ branch .save ()
293294
294295 return product , branch
295296
You can’t perform that action at this time.
0 commit comments