diff --git a/src/Managing.Infrastructure.Database/PostgreSql/PostgreSqlBotRepository.cs b/src/Managing.Infrastructure.Database/PostgreSql/PostgreSqlBotRepository.cs index a7960d0f..ea224640 100644 --- a/src/Managing.Infrastructure.Database/PostgreSql/PostgreSqlBotRepository.cs +++ b/src/Managing.Infrastructure.Database/PostgreSql/PostgreSqlBotRepository.cs @@ -80,7 +80,8 @@ public class PostgreSqlBotRepository : IBotRepository existingEntity.LastStartTime = bot.LastStartTime; existingEntity.LastStopTime = bot.LastStopTime; existingEntity.AccumulatedRunTimeSeconds = bot.AccumulatedRunTimeSeconds; - existingEntity.MasterBotUserId = bot.MasterBotUserId; + existingEntity.MasterBotUserId = + bot.MasterBotUserId ?? existingEntity.MasterBotUserId; await _context.SaveChangesAsync().ConfigureAwait(false); }