Dont fail uploading photo if user cant be found

This commit is contained in:
jvyden 2021-11-07 18:11:49 -05:00
commit 85f3f3cd8d
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -45,7 +45,7 @@ namespace LBPUnion.ProjectLighthouse.Controllers
{
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;
Logger.Log($"Adding PhotoSubject (userid {subject.UserId}) to db");