Skip to content

Commit

Permalink
Use explicit readonly markers more places
Browse files Browse the repository at this point in the history
  • Loading branch information
andchiind committed Aug 30, 2024
1 parent 6b68391 commit 1dc36ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/api/Services/AccessRoleService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private IQueryable<AccessRole> GetAccessRoles(bool readOnly = false)
public async Task<List<string>> GetAllowedInstallationCodes()
{
if (httpContextAccessor.HttpContext == null)
return await context.Installations.Select((i) => i.InstallationCode.ToUpperInvariant()).ToListAsync();
return await context.Installations.AsNoTracking().Select((i) => i.InstallationCode.ToUpperInvariant()).ToListAsync();

var roles = httpContextAccessor.HttpContext.GetRequestedRoleNames();

Expand Down
2 changes: 1 addition & 1 deletion backend/api/Services/MissionRunService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ public async Task<MissionRun> UpdateMissionRunStatusByIsarMissionId(string isarM

public async Task<MissionRun> UpdateMissionRunProperty(string missionRunId, string propertyName, object? value)
{
var missionRun = await ReadById(missionRunId);
var missionRun = await ReadById(missionRunId, readOnly: false);
if (missionRun is null)
{
string errorMessage = $"Mission with ID {missionRunId} was not found in the database";
Expand Down

0 comments on commit 1dc36ac

Please sign in to comment.