Skip to content

Commit

Permalink
fix(systemtags): handle null dav value
Browse files Browse the repository at this point in the history
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Dec 6, 2024
1 parent d114646 commit 99a4f5a
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
6 changes: 5 additions & 1 deletion apps/dav/lib/SystemTag/SystemTagPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,11 @@ public function handleUpdateProperties($path, PropPatch $propPatch) {
}

if (isset($props[self::COLOR_PROPERTYNAME])) {
$color = $props[self::COLOR_PROPERTYNAME];
$propValue = $props[self::COLOR_PROPERTYNAME];
if ($propValue === '' || $propValue === 'null' ) {
$propValue = null;
}
$color = $propValue;
$updateTag = true;
}

Expand Down
2 changes: 1 addition & 1 deletion apps/systemtags/src/services/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const updateTag = async (tag: TagWithId): Promise<void> => {
<oc:display-name>${tag.displayName}</oc:display-name>
<oc:user-visible>${tag.userVisible}</oc:user-visible>
<oc:user-assignable>${tag.userAssignable}</oc:user-assignable>
<nc:color>${tag.color}</nc:color>
<nc:color>${tag?.color || null}</nc:color>
</d:prop>
</d:set>
</d:propertyupdate>`
Expand Down
2 changes: 1 addition & 1 deletion dist/files-sidebar.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/systemtags-admin.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/systemtags-admin.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/systemtags-init.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/systemtags-init.js.map

Large diffs are not rendered by default.

0 comments on commit 99a4f5a

Please sign in to comment.