associatedemployers / safely-api

0 stars 0 forks source link

[Bug] Wrong company on hub-registration #128

Closed Evilscaught closed 7 months ago

Evilscaught commented 7 months ago

Problem bookedResources aggregate is overwriting unique company names, and the registrant names belonging to hub-registrations when it calculates the seats left for the class the hub-registrations belong to.

Reproduction safely.companies.json safely.hubclasses.json safely.hubclassinformations.json safely.hubregistrations.json safely.trainees.json For set-up simplicity, you'll need to replace any other ids such as creator to point to your own records

You can use this aggregate in MongoDB to reproduce the issue as it currently is on main: bad-aggregate-as-is.json

Images One of these hub registrations belongs to a different company, and a different registrant

Bug

Taken From Live:

ISSUE

This issue replaces #192 on Safely