refactor(src/projects): adjust external access import path and clean up unused import
Use absolute import to avoid app label dependencies and improve code clarity
This commit is contained in:
1 file changed
+2
-2
@@ -2,6 +2,8 @@ from django.conf import settings
|
||||
from django.db import models
|
||||
from django.utils import timezone
|
||||
|
||||
from src.external.models import ExternalAccess
|
||||
|
||||
|
||||
class Project(models.Model):
|
||||
name = models.CharField(max_length=255)
|
||||
@@ -40,8 +42,6 @@ class Project(models.Model):
|
||||
self.save(update_fields=["pinned_date"])
|
||||
|
||||
def generate_external_access(self):
|
||||
from apps.external.models import ExternalAccess
|
||||
|
||||
self.external_accesses.all().delete()
|
||||
return ExternalAccess.objects.create(project=self)
|
||||
|
||||
|
||||
Reference in new issue
Block a user