card id overlaps when "quickly" importing csv
Brought to you by:
vlg
It's only a very small problem, but it took me some time to understand why I couldn't merge some decks in cardboxes.
When importing a csv, initial card id is the time in seconds, then increased with each card.
So if I import 100 cards, then import another deck in less than 100 sec, some card id will overlap.
Some solutions:
- keeping a general last_created_card_id in memory
- comparing more than id to find dupes