Comment 3 for bug 1734601

Revision history for this message
Ingo Fischer (ingofischer82) wrote :

We found the bugfix:

In case multiple zones have the same update timestamp (updated_at) the UI did not show any zone and a JS console listed an error "Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed."
To fix it addTimestampIds needs to get the correct parameter order, i.e. pass the name of the ID column before the timestamp column name.

Bugfix (queens):
```
+diff --git a/designatedashboard/static/designatedashboard/resources/os-designate-zone/os-designate-zone.module.js b/designatedashboard/static/designatedashboard/resources/os-designate-zone/os-designate-zone.module.js
+index 3c8bf61..b8a4048 100644
+--- a/designatedashboard/static/designatedashboard/resources/os-designate-zone/os-designate-zone.module.js
++++ b/designatedashboard/static/designatedashboard/resources/os-designate-zone/os-designate-zone.module.js
+@@ -194,7 +194,7 @@
+ // listFunctions are expected to return data in "items"
+ response.data.items = response.data.zones;
+
+- util.addTimestampIds(response.data.items, 'updated_at');
++ util.addTimestampIds(response.data.items, 'id', 'updated_at');
+
+ return response;
+ });
```