Commit d2f1c06e authored by Benedikt Heinrichs's avatar Benedikt Heinrichs
Browse files

Remove unnecessary checks

parent 4ee5d5d3
......@@ -652,7 +652,7 @@ namespace Coscine.Api.Project.Controllers
x.Expiration > DateTime.UtcNow
);
if (invitations != null && invitations.Any())
if (invitations.Any())
{
return BadRequest("This invitee already has a valid invitation to this project.");
}
......@@ -663,13 +663,10 @@ namespace Coscine.Api.Project.Controllers
x.Expiration <= DateTime.UtcNow
);
if (expiredInvitations != null && expiredInvitations.Any())
{
foreach (var expiredInvitation in expiredInvitations)
{
_invitationModel.Delete(expiredInvitation);
}
}
var token = _invitationModel.CreateInvitation(sendInvitationObject.Project, user.Id, sendInvitationObject.Role, sendInvitationObject.Email);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment