Skip to content

Comments

Convert json numbers to numbers in JSON inputs#5496

Merged
WithoutPants merged 1 commit intostashapp:developfrom
WithoutPants:issues/5483
Nov 21, 2024
Merged

Convert json numbers to numbers in JSON inputs#5496
WithoutPants merged 1 commit intostashapp:developfrom
WithoutPants:issues/5483

Conversation

@WithoutPants
Copy link
Collaborator

Numeric values when provided to the server via the graphql interface, end up encoded json.Number if they do not have a specific schema type - for example, when passed in via a generic map. This means that the UI and plugin settings would save numeric values as strings. This caused an issue with the Image Wall margins, since it expected a numeric value and not a string value. This could also cause additional intended consequences.

This change converts json.Number values in map values to the correct int64 or float64 values.

Fixes #5483. Note that this will require re-saving the image margin value to fix the issue.

@WithoutPants WithoutPants added the bug Something isn't working label Nov 21, 2024
@WithoutPants WithoutPants added this to the Version 0.28.0 milestone Nov 21, 2024
@WithoutPants WithoutPants merged commit 6c5bf5f into stashapp:develop Nov 21, 2024
XGFan pushed a commit to XGFan/stash that referenced this pull request Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report] Image Wall Margin is set to 2px but displays 0px.

1 participant