Skip to content

Conversation

@NikAcc
Copy link
Collaborator

@NikAcc NikAcc commented Jan 23, 2025

Fixes #27

The solution was generated using github copilot workspace.


For more details, open the Copilot Workspace session.

Fixes #27

The solution was generated using github copilot workspace.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/accso/SecureCheckPlus/issues/27?shareId=XXXX-XXXX-XXXX-XXXX).
@NikAcc NikAcc requested a review from marcus67 January 23, 2025 12:16
@NikAcc
Copy link
Collaborator Author

NikAcc commented Jan 27, 2025

The solution generated by copilot was pretty much entirely wrong, so I reworked it and now it should be properly working.


projectId = serializers.CharField(source="project_id", read_only=True)
projectName = serializers.CharField(source="project_name", allow_blank=True, validators=[MaxLengthValidator(255)])
projectName = serializers.CharField(source="project_name", allow_blank=True, max_length=255)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this length relate to the maximum length of 25 characters declared in backend/analyzer/models.py?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I haven't seen the constraint in models.py. I think that the check in project_serializer.py is then redundant and can be removed without losing validation. Is that correct? Or should we lave it, but reduce it to 25?

@marcus67
Copy link
Member

marcus67 commented Jan 28, 2025 via email

@NikAcc NikAcc requested a review from kreinern January 28, 2025 12:12
@kreinern
Copy link
Collaborator

This should be merged after 26-extended-field-lengths to avoid issues.

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.

Check input length of project name

4 participants