Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing card backups #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

mjf-ans
Copy link

@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