summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2018-09-06 21:55:14 +0200
committerSebastian Reichel <sre@ring0.de>2018-09-06 23:08:56 +0200
commit7906378ff2687b4b7d578aa5b7d4a3e8d5a6e8a2 (patch)
treee896c18a871d71f9fe59c019f015cf99acc26d7d /src
parente6760afba762206d283aaa471c0fc1152d5feff0 (diff)
downloadserial-barcode-scanner-7906378ff2687b4b7d578aa5b7d4a3e8d5a6e8a2.tar.bz2
database: fix RFID comparison
Diffstat (limited to 'src')
-rw-r--r--src/database/db-interface.vala11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/database/db-interface.vala b/src/database/db-interface.vala
index f2d3e87..840f0a8 100644
--- a/src/database/db-interface.vala
+++ b/src/database/db-interface.vala
@@ -147,7 +147,16 @@ public struct UserInfo {
if(joined_at != x.joined_at) return false;
if(disabled != x.disabled) return false;
if(hidden != x.hidden) return false;
- if(rfid != x.rfid) return false;
+
+ /* check if both objects contain the same RFIDs */
+ foreach(var id in rfid) {
+ if(!(id in x.rfid))
+ return false;
+ }
+ foreach(var id in x.rfid) {
+ if(!(id in rfid))
+ return false;
+ }
return true;
}