Skip to content
This repository has been archived by the owner on Aug 28, 2022. It is now read-only.

Commit

Permalink
hotfix: do not fail with NRE on getting quest
Browse files Browse the repository at this point in the history
  • Loading branch information
FrediKats committed Dec 19, 2020
1 parent 22f98d5 commit e630178
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Iwentys.Features.Quests.Models
public record QuestInfoDto
{
public QuestInfoDto(QuestEntity questEntity)
: this(
: this(
questEntity.Id,
questEntity.Title,
questEntity.Description,
Expand All @@ -21,7 +21,8 @@ public QuestInfoDto(QuestEntity questEntity)
questEntity.State,
questEntity.IsOutdated,
new StudentInfoDto(questEntity.Author),
questEntity.Responses.SelectToList(qr => new QuestResponseInfoDto(qr)))
//TODO: fix this
questEntity.Responses?.SelectToList(qr => new QuestResponseInfoDto(qr)))
{
}

Expand Down

0 comments on commit e630178

Please sign in to comment.