Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ public static class TenantSteps
{
public const string Create201 = "Create β†’ 201";
public const string Create400Duplicate = "Create β†’ 400 (duplicate)";
public const string Create400NoVendor = "Create β†’ 400 (no vendor)";
public const string Create400NoName = "Create β†’ 400 (no name)";
public const string Search200 = "Search β†’ 200";
public const string Search204NoResults = "Search β†’ 204 (no results)";
Expand All @@ -416,7 +415,6 @@ public static class TenantSteps
public const string Get404 = "Get β†’ 404";
public const string Update200 = "Update β†’ 200";
public const string Update404NonExistent = "Update β†’ 404 (non-existent)";
public const string Update400NoVendor = "Update β†’ 400 (no vendor)";
public const string CheckExists200 = "CheckExists β†’ 200";
public const string CheckExists404 = "CheckExists β†’ 404";
public const string SoftDelete204 = "SoftDelete β†’ 204";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ AdHocReportRequest BuildAdhoc(
results.Add(await RunStepAsync(StepNames.Create400Duplicate, 400, async () =>
await _client.CreateAsync(BuildFacility(facilityId, vendor: testVendor), ct), ct: ct));

// Create β†’ 400 (no vendor)
results.Add(await RunStepAsync(StepNames.Create400NoVendor, 400, async () =>
await _client.CreateAsync(BuildFacility($"ApiHealth-NoVendor-{Guid.NewGuid():N}", "NoVendor", null), ct), ct: ct));

// Create β†’ 400 (no name)
results.Add(await RunStepAsync(StepNames.Create400NoName, 400, async () =>
await _client.CreateAsync(BuildFacility($"ApiHealth-NoName-{Guid.NewGuid():N}", name: null, allowNullName: true, vendor: testVendor), ct), ct: ct));
Expand Down Expand Up @@ -187,10 +183,6 @@ AdHocReportRequest BuildAdhoc(
results.Add(await RunStepAsync(StepNames.Update404NonExistent, 404, async () =>
await _client.UpdateAsync(fakeFacilityId, BuildFacility(fakeFacilityId), ct), ct: ct));

// Update β†’ 400 (no vendor)
results.Add(await RunStepAsync(StepNames.Update400NoVendor, 400, async () =>
await _client.UpdateAsync(facilityId, BuildFacility(facilityId, vendor: null), ct), ct: ct));

// === GET /api/Facility/{id} (exists check) ===

// CheckExists β†’ 200
Expand Down
10 changes: 0 additions & 10 deletions DotNet/Tenant/Controllers/FacilityController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,6 @@ public async Task<IActionResult> StoreFacility(FacilityModel newFacility, Cancel
return BadRequest();
}

if (newFacility.Vendor == null)
{
return BadRequest("Vendor must be provided.");
}

try
{
await _facilityManager.CreateAsync(facilityEntity, cancellationToken);
Expand Down Expand Up @@ -324,11 +319,6 @@ public async Task<ActionResult<FacilityModel>> PutFacility(string facilityId, Fa
return NotFound();
}

if (facilityConfig.Vendor == null)
{
return BadRequest("Vendor must be provided.");
}

var oldFacility = _mapperDtoToModel.Map<FacilityModel, Facility>(existingModel);
var newFacility = _mapperDtoToModel.Map<FacilityModel, Facility>(facilityConfig);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class FacilityConfigFormComponent implements OnInit, OnChanges {
facilityId: new FormControl('', [Validators.required, facilityIdConditionalValidator(this.appConfig?.allowAlphaNumericFacilityId ?? true)]),
facilityName: new FormControl('', Validators.required),
timeZone: new FormControl('', Validators.required),
vendor: new FormControl<IVendorVersion | null>(null, Validators.required),
vendor: new FormControl<IVendorVersion | null>(null),
monthlyReports: new FormControl([]),
dailyReports: new FormControl([]),
weeklyReports: new FormControl([]),
Expand Down
Loading