rit-sse / node-api

💯 The SSE New and Improved Unified API
https://sse.rit.edu/api/v2
MIT License
8 stars 9 forks source link

Update committee relationship to avoid sequelize duplicating on include #96

Closed gavrielrh closed 4 years ago

gavrielrh commented 4 years ago

Updates the relationship for committees to officers to be a hasMany relationship, as we have multiple officers under the General committee, but the relationship didn't reflect that. This resolves the issue where scoping committees by active officers (via an include) was resulting in duplicate committees (as each officer had "their own" General committee)

akath20 commented 4 years ago

This looks good to me. Asking for additional eyes though since this would be a DB change and could cause issues in prod if there is a problem with migrations.