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

Patch Bug that prevents loading ts_library.json fields ids as integers #95

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

Loran425
Copy link
Collaborator

filename = entry.get('filename', '')
e_path = entry.get('path', '')
fields = []
if 'fields' in entry:
# Cast JSON str keys to ints
for f in fields:
f[int(list(f.keys())[0])
] = f[list(f.keys())[0]]
del f[list(f.keys())[0]]
fields = entry['fields']

causes fields to load into memory as list[dict[str,list[int]]] instead of list[dict[int,list[int]]]

This causes #93 and leads to unintended cases of #92

Fixes #93

@CyanVoxel CyanVoxel merged commit 0c9dd7f into TagStudioDev:main Apr 29, 2024
@Loran425 Loran425 deleted the patch/library-loading branch April 29, 2024 19:09
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.

[Bug] Using Folders to Tags macro always creates a new tag box even when one already exists
2 participants