SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 9eb0cb91 authored by George Katsikas's avatar George Katsikas :goat:
Browse files

add typehints to invitation and scipost

parent 358730c3
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ __license__ = "AGPL v3"
import datetime
from typing import TYPE_CHECKING
from django.db import models
from django.urls import reverse
......@@ -14,6 +15,11 @@ from ..behaviors import SubmissionRelatedObjectMixin
from ..managers import RefereeInvitationQuerySet
from ..models import EditorialAssignment
if TYPE_CHECKING:
from profiles.models import Profile
from scipost.models import Contributor
from submissions.models import Submission
class RefereeInvitation(SubmissionRelatedObjectMixin, models.Model):
"""Invitation to an active professional scientist to referee a Submission.
......@@ -25,15 +31,15 @@ class RefereeInvitation(SubmissionRelatedObjectMixin, models.Model):
"""
profile = models.ForeignKey(
profile = models.ForeignKey["Profile"](
"profiles.Profile", on_delete=models.SET_NULL, blank=True, null=True
)
submission = models.ForeignKey(
submission = models.ForeignKey["Submission"](
"submissions.Submission",
on_delete=models.CASCADE,
related_name="referee_invitations",
)
referee = models.ForeignKey(
referee = models.ForeignKey["Contributor"](
"scipost.Contributor",
related_name="referee_invitations",
blank=True,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment