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

List of JSON data is not populating as expected #172

Closed
Alihassanc5 opened this issue Jun 26, 2024 · 5 comments
Closed

List of JSON data is not populating as expected #172

Alihassanc5 opened this issue Jun 26, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Alihassanc5
Copy link

Alihassanc5 commented Jun 26, 2024

My model structure is:

ITEMS_SCHEMA = {
     'type': 'dict',
     'keys': {
        'id': {'type': 'integer'},
        'answer': {'type': 'string'},
        'question': {'type': 'string'},
        'required': {'type': 'boolean'},
        'help_text': {'type': 'string'},
        'identifier': {'type': 'string'},
     },
     'required': ['id', 'answer', 'question']
}


class ResearchReport(TimeStampedModel):
    questions = ArrayField(JSONField(schema=ITEMS_SCHEMA), help_text="Questions of the research report", null=True, blank=True)    

And it's showing like this on admin panel:

image
@Alihassanc5
Copy link
Author

@bhch could you please help me? What am I doing wrong?

@bhch bhch added the bug Something isn't working label Jul 1, 2024
@bhch bhch closed this as completed in 98f3a5b Jul 1, 2024
@bhch
Copy link
Owner

bhch commented Jul 1, 2024

Hi, thanks for reporting this issue.

Currently, the ArrayField doesn't support nesting JSONField. I've fixed this issue now. I'll release a new version soon.

@Alihassanc5
Copy link
Author

@bhch thank you for quick support, could you please tell me the expected date of new release?

@bhch
Copy link
Owner

bhch commented Jul 1, 2024

A couple of days.

@bhch
Copy link
Owner

bhch commented Sep 18, 2024

Released in v2.23.0.

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

No branches or pull requests

2 participants