Remove unnecessary null checks
This commit is contained in:
parent
0b7efc3420
commit
29041044e7
1 changed files with 4 additions and 4 deletions
|
|
@ -40,10 +40,10 @@ pub fn entityQueryResult(request: *jetzig.Request, query: GeneratedQuery, args:
|
||||||
.album = if (entity.album_id) |_| .{ .id = entity.album_id.?, .name = entity.album_name.? } else null,
|
.album = if (entity.album_id) |_| .{ .id = entity.album_id.?, .name = entity.album_name.? } else null,
|
||||||
.song = if (entity.song_id) |_| .{ .id = entity.song_id.?, .name = entity.song_name.? } else null,
|
.song = if (entity.song_id) |_| .{ .id = entity.song_id.?, .name = entity.song_name.? } else null,
|
||||||
.artistlist = if (artist_list.getLastOrNull()) |_| try artist_list.toOwnedSlice() else null,
|
.artistlist = if (artist_list.getLastOrNull()) |_| try artist_list.toOwnedSlice() else null,
|
||||||
.scrobbles = if (entity.scrobbles) |scrobbles| scrobbles else null,
|
.scrobbles = entity.scrobbles,
|
||||||
.date = if (entity.date) |date| date else null,
|
.date = entity.date,
|
||||||
.score = if (entity.score) |score| score else null,
|
.score = entity.score,
|
||||||
.review = if (entity.review) |review| review else null,
|
.review = entity.review,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue