RepositoryController Update now returns OK without ActiveJob field if no git changes to make

This commit is contained in:
Cyberboss
2018-09-13 10:14:50 -04:00
parent dba2f81d95
commit 89e3141689
@@ -401,9 +401,13 @@ namespace Tgstation.Server.Host.Controllers
x.PullRequestRevision != null ? String.Format(CultureInfo.InvariantCulture, " {0}", x.PullRequestRevision.Substring(0, 7)) : String.Empty))),
description != null ? String.Empty : " in repository");
if (description == null)
//no git changes
return Json(api);
var job = new Models.Job
{
Description = description ?? "Apply repository changes",
Description = description,
StartedBy = AuthenticationContext.User,
Instance = Instance,
CancelRightsType = RightsType.Repository,