Skip to content

Bug: start_date or end_date is null in the database, causing 500 error on project page #405

@gheorghelupu17

Description

@gheorghelupu17

Description

We've encountered a case where the start_date or end_date field in the Project model is null in the database. This causes a 500 Internal Server Error on the project detail page in the frontend when attempting to render the project.


✅ Proposed Actions

  1. Add a fallback in the frontend/backend to handle cases where start_date or end_date is null, to avoid runtime errors.
  2. Investigate the root cause of these fields being saved as null.
    • null values should only be allowed for projects in draft status.
    • For projects that are published or active, both start_date and end_date should be required and properly validated.

✅ Expected Behavior

  • Projects in draft status: may have missing (null) date fields.
  • Projects in published/active status: must have valid start_date and end_date.
  • Application must not crash due to missing date fields.

💥 Impact

This issue causes the frontend to break with a 500 error, impacting user access to project pages and overall app stability.


📝 Additional Notes

  • Consider checking validation at both the model and serializer/form level.
  • Review any migrations or data input sources that may allow saving projects without these fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions