Repository: sebadob/rauthy (language: rust)

Issue:
UI does not update when deleting attribute
Reproduction steps:

1. Login to Rauthy admin UI
2. Navigate to Attributes
3. Add new user attribute: "test" "test"
4. Save
5. test -> Delete -> Delete
6. Observe remaining attribute

Deleting again shows a "no rows returned" error message


Discussion / hints:
Thanks,

did not know about this yet, but this will be resolved automatically with the next release, which will include #642 .
The UI has quite a few issues in different places which will all be resolved during the Svelte 5 migration.

Fix patch:
diff --git a/frontend/src/components/admin/userAttr/Attr.svelte b/frontend/src/components/admin/userAttr/Attr.svelte
index 415d7d2c7..00f676019 100644
--- a/frontend/src/components/admin/userAttr/Attr.svelte
+++ b/frontend/src/components/admin/userAttr/Attr.svelte
@@ -40,6 +40,14 @@
     }
 
     function onSave() {
+        // Just a workaround for now until the order and search components have been migrated to svelte5.
+        // If the last existing `attr` has been deleted, the list would not update.
+        if (attr.length < 2) {
+            attr = [];
+            resAttr = [];
+            resAttrPaginated = [];
+        }
+
         fetchAttr();
         search = '';
     }


Test patch: