Skip to content

Commit

Permalink
fix property schema, use added by
Browse files Browse the repository at this point in the history
  • Loading branch information
aidangannon committed Jul 7, 2024
1 parent da4f065 commit 2a581ca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/src/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Property(Entity):
url: str = None
title: str = None
price: Decimal = None
full_name: str = None
added_by: str = None


@dataclass(unsafe_hash=True)
Expand Down
2 changes: 1 addition & 1 deletion backend/src/domain/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def run(self, context: ApplicationContext):
property = Property(url=property_request.url,
title=property_request.title,
price=property_request.price,
full_name=user_groups.name)
added_by=user_groups.name)
self.__property_repo.create(group_id=group.id, property=property)
context.response = PropertyCreatedResponse(property=property)

Expand Down
2 changes: 1 addition & 1 deletion backend/tests/unit/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def test_run(self, _):
expected_property = Property(url=property.url,
title=property.title,
price=property.price,
full_name=user_groups.name)
added_by=user_groups.name)
self.__property_repo.create = MagicMock()

# act
Expand Down

0 comments on commit 2a581ca

Please sign in to comment.