Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions src/database/model/project/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,6 @@ class Project(ProjectBase, AIResource, table=True): # type: ignore [call-arg]
__abbreviation__ = "proj"
__plural__ = "projects"

funder: list[Organisation] = Relationship(
link_model=many_to_many_link_factory(
"project",
Organisation.__tablename__,
table_prefix="funder",
from_identifier_type=str,
to_identifier_type=str,
),
)
participant: list[Organisation] = Relationship(
link_model=many_to_many_link_factory(
"project",
Expand Down Expand Up @@ -105,14 +96,6 @@ class Project(ProjectBase, AIResource, table=True): # type: ignore [call-arg]
)

class RelationshipConfig(AIResource.RelationshipConfig):
funder: list[str] = ManyToMany(
description="Identifiers of organizations that support this project through some kind "
"of financial contribution. ",
_serializer=AttributeSerializer("identifier"),
deserializer=FindByIdentifierDeserializerList(Organisation),
default_factory_pydantic=list,
example=[],
)
participant: list[str] = ManyToMany(
description="Identifiers of members of this project. ",
_serializer=AttributeSerializer("identifier"),
Expand Down
3 changes: 0 additions & 3 deletions src/tests/routers/resource_routers/test_router_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def test_happy_path(
body["start_date"] = "2021-02-02T15:15:00"
body["end_date"] = "2021-02-03T15:15:00"
body["total_cost_euros"] = 10000000.53
body["funder"] = [organisation.identifier]
body["participant"] = [organisation.identifier]
body["coordinator"] = organisation.identifier
body["produced"] = [dataset.identifier]
Expand All @@ -56,7 +55,6 @@ def test_happy_path(
assert response_json["start_date"] == "2021-02-02T15:15:00"
assert response_json["end_date"] == "2021-02-03T15:15:00"
assert response_json["total_cost_euros"] == 10000000.53
assert response_json["funder"] == [organisation.identifier]
assert response_json["participant"] == [organisation.identifier]
assert response_json["coordinator"] == organisation.identifier
assert response_json["produced"] == [dataset.identifier]
Expand All @@ -65,7 +63,6 @@ def test_happy_path(
assert response_json["subtitle"] == subtitle

# Cleanup, so that all resources can be deleted in the teardown
body["funder"] = []
body["participant"] = []
body["coordinator"] = None
body["produced"] = []
Expand Down