Skip to content

Missing card backups#38

Open
mjf-ans wants to merge 2 commits intojtpio:masterfrom
mjf-ans:missing-card-backups
Open

Missing card backups#38
mjf-ans wants to merge 2 commits intojtpio:masterfrom
mjf-ans:missing-card-backups

Conversation

@mjf-ans
Copy link
Copy Markdown

@mjf-ans mjf-ans commented Aug 10, 2022

There are many cards which are present in the board's $NAME_full.json backup, but don't get their own card.json file, and their attachments aren't downloaded.

The problem is here:

    cs = itertools.groupby(board_details['cards'], key=lambda x: x['idList'])
    for list_id, cards in cs:
        lists[list_id] = sorted(list(cards), key=lambda card: card['pos'])

This assumes that all the cards for any list are together in one batch in the board's data. If they are split up (which I've seen happen), the last batch in the itertools.groupby overwrites any previous ones in list, and only those cards are backed up.

This pull request fixes that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant