This is probably an extremely rare scenario, yet is causes some issues with the Lightroom plugin...
Step 1 - upload a photo with keyword tags. Works OK
Step 2 - replace the photo AND remove all tags - the photo is replaced, however all previously assigned tags remain.
This is caused by the following code in ws_images_add:
if (isset($params['tag_ids']) and !empty($params['tag_ids']))
{
set_tags(
explode(',', $params['tag_ids']),
$image_id
);
}
Note, tags will set only when the tag_ids parameter is not empty. But when I want to clear all tags, the value is an empty string!
When pwg.images.add is invoked with the image_id parameter, it must respect single_value_mode and multiple_value_mode (just the way it works in ws_images_setInfo), otherwise replacing the photo and updating its properties works incorrectly.
This is probably an extremely rare scenario, yet is causes some issues with the Lightroom plugin...
Step 1 - upload a photo with keyword tags. Works OK
Step 2 - replace the photo AND remove all tags - the photo is replaced, however all previously assigned tags remain.
This is caused by the following code in **ws_images_add**:
```
if (isset($params['tag_ids']) and !empty($params['tag_ids']))
{
set_tags(
explode(',', $params['tag_ids']),
$image_id
);
}
```
Note, tags will set only when the tag_ids parameter is not empty. But when I want to clear all tags, the value is an empty string!
When pwg.images.add is invoked with the **image_id** parameter, it must respect **single_value_mode** and **multiple_value_mode** (just the way it works in **ws_images_setInfo**), otherwise replacing the photo and updating its properties works incorrectly.
<!-- github-sync-id:159854836 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This is probably an extremely rare scenario, yet is causes some issues with the Lightroom plugin...
Step 1 - upload a photo with keyword tags. Works OK
Step 2 - replace the photo AND remove all tags - the photo is replaced, however all previously assigned tags remain.
This is caused by the following code in ws_images_add:
Note, tags will set only when the tag_ids parameter is not empty. But when I want to clear all tags, the value is an empty string!
When pwg.images.add is invoked with the image_id parameter, it must respect single_value_mode and multiple_value_mode (just the way it works in ws_images_setInfo), otherwise replacing the photo and updating its properties works incorrectly.