Skip to content

Commit 4d9d51e

Browse files
ermmmaksDedSec256
andauthored
Solutions/PostOrUpdate: исправление для isModified (#644)
Co-authored-by: Alex Berezhnykh <berejnih.alex2011@yandex.ru>
1 parent 6957355 commit 4d9d51e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

HwProj.SolutionsService/HwProj.SolutionsService.API/Services/SolutionsService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,13 @@ await _solutionsRepository
120120

121121
if (lastSolution != null && lastSolution.State == SolutionState.Posted)
122122
{
123+
var isModified = lastSolution.GithubUrl != solution.GithubUrl || lastSolution.Comment != solution.Comment;
123124
await _solutionsRepository.UpdateAsync(lastSolution.Id, x => new Solution
124125
{
125126
GithubUrl = solution.GithubUrl,
126127
Comment = solution.Comment,
127128
GroupId = solution.GroupId,
128-
IsModified = true,
129+
IsModified = isModified,
129130
State = SolutionState.Posted,
130131
});
131132
solutionId = lastSolution.Id;

0 commit comments

Comments
 (0)