CatimaImporter: add comment about card group import

Co-authored-by: Sylvia van Os <sylvia@hackerchick.me>
This commit is contained in:
FC Stegerman
2023-07-17 20:38:27 +02:00
parent ac0f6f6f3e
commit d350d0b2c7

View File

@@ -142,6 +142,7 @@ public class CatimaImporter implements Importer {
for (Map.Entry<Integer, String> entry : data.cardGroups) {
int cardId = idMap.getOrDefault(entry.getKey(), entry.getKey());
String groupId = entry.getValue();
// For existing & newly imported cards, add the groups from the import to the internal state
List<Group> cardGroups = DBHelper.getLoyaltyCardGroups(database, cardId);
cardGroups.add(DBHelper.getGroup(database, groupId));
DBHelper.setLoyaltyCardGroups(database, cardId, cardGroups);