Skip to content

[BUG] Fix microcourse source URL data model mismatch (URLField vs JSON list) #10

@EQuBitC18

Description

@EQuBitC18

Description

The backend accepts multiple source URLs, serializes them into JSON text, and stores the result in a single URLField. This is a schema mismatch and can create validation and interoperability problems.

Steps to Reproduce

Send POST /api/add_microcourse/ with more than one url field value.
Inspect saved Microcourse.url in database or API output.
Observe JSON-serialized list content stored in a field typed for a single URL.

Expected Behavior

Schema and API should represent source URLs explicitly as one-to-many data (for example JSONField or related model), not as serialized list text in a single URL field

Severity

High (Major functionality broken)

Version

No response

Environment

No response

Additional Context

Model field: Tezrisat_Backend/api/models.py:11
Serialization and assignment: Tezrisat_Backend/api/views.py:250, :287

Checklist

  • I have searched for similar issues and confirmed this is not a duplicate
  • I have tested this on the latest version
  • I am willing to provide additional information if needed

Metadata

Metadata

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions