fix: project url max length (#471)

This commit is contained in:
pablohashescobar 2023-03-22 01:35:53 +05:30 committed by GitHub
parent f7dbc5e9c0
commit 4dc76eac19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -178,6 +178,12 @@ class ProjectViewSet(BaseViewSet):
{"name": "The project name is already taken"},
status=status.HTTP_410_GONE,
)
else:
capture_exception(e)
return Response(
{"error": "Something went wrong please try again later"},
status=status.HTTP_410_GONE,
)
except Workspace.DoesNotExist as e:
return Response(
{"error": "Workspace does not exist"}, status=status.HTTP_404_NOT_FOUND

View File

@ -64,7 +64,7 @@ class Project(BaseModel):
module_view = models.BooleanField(default=True)
cycle_view = models.BooleanField(default=True)
issue_views_view = models.BooleanField(default=True)
cover_image = models.URLField(blank=True, null=True)
cover_image = models.URLField(blank=True, null=True, max_length=800)
def __str__(self):
"""Return name of the project"""