Skip to content

Commit 067a9ff

Browse files
committed
#82 Fix draft edit bug because of shitcode
Signed-off-by: vityaman <vityaman.dev@yandex.ru>
1 parent 987a87d commit 067a9ff

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

backend/people/src/main/kotlin/ru/ifmo/se/dating/people/api/mapping/PersonMapping.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fun PersonPatchMessage.toModel(id: Int) = Person.Draft(
1010
lastName = lastName?.let { Person.Name(it) },
1111
height = height,
1212
birthday = birthday,
13-
interests = interests?.map { it.toModel() }?.toSet() ?: emptySet(),
13+
interests = emptySet(),
1414
facultyId = facultyId?.let { Faculty.Id(it.toInt()) },
1515
locationId = locationId?.let { Location.Id(it.toInt()) },
1616
)

backend/people/src/main/kotlin/ru/ifmo/se/dating/people/logic/basic/BasicPersonService.kt

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class BasicPersonService(
4949

5050
if (
5151
variant is Person.Draft && expected.copy(
52+
interests = variant.interests,
5253
pictureIds = variant.pictureIds,
5354
version = variant.version,
5455
) != variant

0 commit comments

Comments
 (0)