From 89e3141689bc663bb8562f77fbd2f2c39073a679 Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Thu, 13 Sep 2018 10:14:50 -0400 Subject: [PATCH] RepositoryController Update now returns OK without ActiveJob field if no git changes to make --- .../Controllers/RepositoryController.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Controllers/RepositoryController.cs b/src/Tgstation.Server.Host/Controllers/RepositoryController.cs index 92bff1cf9b..3cc31661ca 100644 --- a/src/Tgstation.Server.Host/Controllers/RepositoryController.cs +++ b/src/Tgstation.Server.Host/Controllers/RepositoryController.cs @@ -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,