mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 16:11:05 +01:00
Fix post clone job failure
This commit is contained in:
@@ -175,7 +175,12 @@ namespace Tgstation.Server.Host.Controllers
|
||||
if (repos == null)
|
||||
throw new JobException("Filesystem conflict while cloning repository!");
|
||||
var db = serviceProvider.GetRequiredService<IDatabaseContext>();
|
||||
if (await PopulateApi(api, repos, db, Instance, ct).ConfigureAwait(false))
|
||||
var instance = new Instance
|
||||
{
|
||||
Id = Instance.Id
|
||||
};
|
||||
db.Instances.Attach(instance);
|
||||
if (await PopulateApi(api, repos, db, instance, ct).ConfigureAwait(false))
|
||||
await db.Save(ct).ConfigureAwait(false);
|
||||
}
|
||||
}, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
Reference in New Issue
Block a user