Skip to content

Commit

Permalink
fix(event): update for 2025 season (#824)
Browse files Browse the repository at this point in the history
Co-authored-by: Rik Smale <[email protected]>
  • Loading branch information
WikiRik and Rik Smale authored Dec 30, 2024
1 parent 2e92df0 commit 90ec1be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ exports.addEvent = async (req, res) => {
data.status = 'first submission';

if (!data.season) {
data.season = 2024;
data.season = 2025;
}

const event = new Event(data);
Expand Down Expand Up @@ -269,7 +269,7 @@ exports.editEvent = async (req, res) => {
delete data.published;

if (!data.season) {
data.season = 2024;
data.season = 2025;
}

if (Object.keys(data).length === 0) {
Expand Down
4 changes: 2 additions & 2 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@ exports.getEventPermissions = async ({ permissions, event, user }) => {
permissions.delete_summeruniversity = permissions.manage_summeruniversity[event.type];

if (user) {
// TODO: this is a temporary solution so people that have applied in 2021, 2022 and/or 2023 can apply again
// TODO: this is a temporary solution so people that have applied in 2021, 2022, 2023 and/or 2024 can apply again
const applicationCount = await Application.count({ where: {
user_id: user.id,
event_id: { [Sequelize.Op.ne]: event.id },
status: { [Sequelize.Op.ne]: 'rejected' },
cancelled: false,
'$event.season$': 2024
'$event.season$': 2025
},
include: [{
model: Event,
Expand Down
2 changes: 1 addition & 1 deletion models/Event.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const Event = sequelize.define(
}
},
fee: {
// TODO: validate that it is max 14 euros per night for normal people but no max for SUCT/people with proper permission
// TODO: validate that it is max 19.23 euros per night for normal people but no max for SUCT/people with proper permission
type: Sequelize.DECIMAL,
allowNull: false,
defaultValue: 0,
Expand Down

0 comments on commit 90ec1be

Please sign in to comment.