anancarv / python-artifactory

Typed interactions with the Jfrog Artifactory REST API
MIT License
55 stars 50 forks source link

Setting/Updating artifact properties is uploaded with semicolons #127

Closed stardude900 closed 1 year ago

stardude900 commented 1 year ago

Python: 3.9.6 pyartifactory: 1.11.0 requests: 2.28.2 urllib3: 1.26.14 Artifactory: 6.23.23 OS: OSX Monterey

When i try to set or update the properties of an artifact the property name is uploaded correctly, but the value is uploaded with semicolons Screen Shot 2023-02-09 at 8 39 02 AM

set_art_props = art.artifacts.update_properties(
    "internal-ceph/pool/main/quincy/ceph-base_17.2.5-1_amd64.deb", {"prop1": "value", "prop2": "value"}, recursive=False
    )
stardude900 commented 1 year ago

This was caused by putting "value" in quotes, instead of in a list

set_art_props = art.artifacts.set_properties(
     "internal-ceph/pool/main/quincy/ceph-base_17.2.5-1_amd64.deb", {"prop1": [v1], "prop2": [v2]}, recursive=False
     )

The way it works makes a lot of sense because using semi colons allows multiple values to be used for a single property. I've created a PR to update the readme.