Skip to content

Commit

Permalink
remove participant from grant
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoacierno committed Nov 30, 2024
1 parent ccde667 commit 8b19e0e
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions backend/api/grants/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
from typing import Optional

import strawberry
from api.participants.types import Participant
from participants.models import Participant as ParticipantModel

from grants.models import Grant as GrantModel

Expand Down Expand Up @@ -36,15 +34,8 @@ class Grant:
travelling_from: Optional[str]
applicant_reply_deadline: Optional[datetime]

participant: Participant

@classmethod
def from_model(cls, grant: GrantModel) -> Grant:
participant = ParticipantModel.objects.filter(
user_id=grant.user_id,
conference=grant.conference,
).first()

return cls(
id=grant.id,
status=Status(grant.status),
Expand All @@ -64,5 +55,4 @@ def from_model(cls, grant: GrantModel) -> Grant:
notes=grant.notes,
travelling_from=grant.travelling_from,
applicant_reply_deadline=grant.applicant_reply_deadline,
participant=Participant.from_model(participant),
)

0 comments on commit 8b19e0e

Please sign in to comment.