mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-10-04 15:19:43 +00:00
Dont fail uploading photo if user cant be found
This commit is contained in:
parent
eb744d46a1
commit
85f3f3cd8d
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ namespace LBPUnion.ProjectLighthouse.Controllers
|
||||||
{
|
{
|
||||||
subject.User = await this.database.Users.FirstOrDefaultAsync(u => u.Username == subject.Username);
|
subject.User = await this.database.Users.FirstOrDefaultAsync(u => u.Username == subject.Username);
|
||||||
|
|
||||||
if (subject.User == null) return this.BadRequest();
|
if (subject.User == null) continue;
|
||||||
|
|
||||||
subject.UserId = subject.User.UserId;
|
subject.UserId = subject.User.UserId;
|
||||||
Logger.Log($"Adding PhotoSubject (userid {subject.UserId}) to db");
|
Logger.Log($"Adding PhotoSubject (userid {subject.UserId}) to db");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue