Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactored exception for order init error #712

Merged
merged 3 commits into from
Oct 13, 2023

Conversation

MadsNyl
Copy link
Contributor

@MadsNyl MadsNyl commented Oct 8, 2023

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Refactoring of code to be more developer friendly and change some issues

Issue number: closes #

Pull request checklist

Please check if your PR fulfills the following requirements:

  • CHANGELOG.md has been updated. Guide
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • The fixtures have been updated if needed (for migrations)

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@MadsNyl MadsNyl marked this pull request as ready for review October 13, 2023 14:27
@MadsNyl MadsNyl requested a review from thomsen85 October 13, 2023 14:27
@MadsNyl MadsNyl enabled auto-merge (squash) October 13, 2023 14:42
@MadsNyl MadsNyl disabled auto-merge October 13, 2023 14:42
Copy link
Contributor

@thomsen85 thomsen85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nydelig jobba

@@ -2,6 +2,11 @@
from rest_framework.exceptions import APIException


class APIEventIsPaidEventException(APIException):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formater navnet som en feil
APIPaidEventCantBeChangedToFreeEvent(APIException)

typ

@MadsNyl MadsNyl merged commit 96ecf8d into dev Oct 13, 2023
5 checks passed
@MadsNyl MadsNyl deleted the refactor(payment)/event-payment branch October 13, 2023 15:10
MadsNyl added a commit that referenced this pull request Oct 23, 2023
* refactored exception for order init error (#712)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* Refactor(paid event)/rename exception (#717)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* changed name of exception

* Trigger Build

* notification for waiting list and when coming from waiting list (#725)

* use env variable for celery broker url (#726)

* chore: use env variable for celery broker url

* chore: set default env varibale if not configured

* Give HS user permissions (#727)

* Give HS user permissions

* Fix

* Update CHANGELOG.md

---------

Co-authored-by: Martin Clementz <[email protected]>
Co-authored-by: Thomas H. Svendal <[email protected]>
MadsNyl added a commit that referenced this pull request Nov 6, 2023
* refactored exception for order init error (#712)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* Refactor(paid event)/rename exception (#717)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* changed name of exception

* Trigger Build

* notification for waiting list and when coming from waiting list (#725)

* use env variable for celery broker url (#726)

* chore: use env variable for celery broker url

* chore: set default env varibale if not configured

* Give HS user permissions (#727)

* Give HS user permissions

* Fix

* Update CHANGELOG.md

* Feat(event)/waitlist (#724)

* Fix(registration)/waitlist limit (#729)

* users from wait list get bumped up if event limit is increased, and users from queue get bumped down if the limit is decreased. Priority is respected

* format

* altered test with bigger dicrease, and to test if priority is respected

* added endpotint for manually adding members to an event (#730)

* added endpotint for manually adding members to an event

* format

* made migrations

* test for registration on wait list if event is full

* Feat(qr)/qr generator (#719)

* added model for QR code, viewset and serializer

* finished create and destroy methods, and mades tests for these

* altered create viewset to take user from request

* fixed tests

* changed status code for deletion of qr code to 200 since frontend dosent accept 204 status code....

* format

* removed earlier unused method

* format

* Trigger Build

* changed exception to take all errors with making a blob

* format

* added azure key to settings file

* format

* changed name of exception for blbo not found

* altered ci.yaml file to add azure connecntion string as env

* fix ci file

* changed model to take content, and serializer not upload image to azure

* format

* added users and groups to fixture (#731)

* made it possible to add members before and after registration open time (#733)

* made it possible to add members before and after registration open time

* can add for paid event

* format

* format

* Update CHANGELOG.md

---------

Co-authored-by: Martin Clementz <[email protected]>
Co-authored-by: Thomas H. Svendal <[email protected]>
Co-authored-by: Anders <[email protected]>
MadsNyl added a commit that referenced this pull request Nov 16, 2023
* refactored exception for order init error (#712)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* Refactor(paid event)/rename exception (#717)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* changed name of exception

* Trigger Build

* notification for waiting list and when coming from waiting list (#725)

* use env variable for celery broker url (#726)

* chore: use env variable for celery broker url

* chore: set default env varibale if not configured

* Give HS user permissions (#727)

* Give HS user permissions

* Fix

* Update CHANGELOG.md

* Feat(event)/waitlist (#724)

* Fix(registration)/waitlist limit (#729)

* users from wait list get bumped up if event limit is increased, and users from queue get bumped down if the limit is decreased. Priority is respected

* format

* altered test with bigger dicrease, and to test if priority is respected

* added endpotint for manually adding members to an event (#730)

* added endpotint for manually adding members to an event

* format

* made migrations

* test for registration on wait list if event is full

* Feat(qr)/qr generator (#719)

* added model for QR code, viewset and serializer

* finished create and destroy methods, and mades tests for these

* altered create viewset to take user from request

* fixed tests

* changed status code for deletion of qr code to 200 since frontend dosent accept 204 status code....

* format

* removed earlier unused method

* format

* Trigger Build

* changed exception to take all errors with making a blob

* format

* added azure key to settings file

* format

* changed name of exception for blbo not found

* altered ci.yaml file to add azure connecntion string as env

* fix ci file

* changed model to take content, and serializer not upload image to azure

* format

* added users and groups to fixture (#731)

* made it possible to add members before and after registration open time (#733)

* made it possible to add members before and after registration open time

* can add for paid event

* format

* format

* Update CHANGELOG.md

* Activity (#736)

* first version

* changed ordering for activities

* filled out categiory enum

* fixed test

* fixed test again

* Update CHANGELOG.md

---------

Co-authored-by: Martin Clementz <[email protected]>
Co-authored-by: Thomas H. Svendal <[email protected]>
Co-authored-by: Anders <[email protected]>
MadsNyl added a commit that referenced this pull request Jan 15, 2024
* refactored exception for order init error (#712)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* Refactor(paid event)/rename exception (#717)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* changed name of exception

* Trigger Build

* notification for waiting list and when coming from waiting list (#725)

* use env variable for celery broker url (#726)

* chore: use env variable for celery broker url

* chore: set default env varibale if not configured

* Give HS user permissions (#727)

* Give HS user permissions

* Fix

* Update CHANGELOG.md

* Feat(event)/waitlist (#724)

* Fix(registration)/waitlist limit (#729)

* users from wait list get bumped up if event limit is increased, and users from queue get bumped down if the limit is decreased. Priority is respected

* format

* altered test with bigger dicrease, and to test if priority is respected

* added endpotint for manually adding members to an event (#730)

* added endpotint for manually adding members to an event

* format

* made migrations

* test for registration on wait list if event is full

* Feat(qr)/qr generator (#719)

* added model for QR code, viewset and serializer

* finished create and destroy methods, and mades tests for these

* altered create viewset to take user from request

* fixed tests

* changed status code for deletion of qr code to 200 since frontend dosent accept 204 status code....

* format

* removed earlier unused method

* format

* Trigger Build

* changed exception to take all errors with making a blob

* format

* added azure key to settings file

* format

* changed name of exception for blbo not found

* altered ci.yaml file to add azure connecntion string as env

* fix ci file

* changed model to take content, and serializer not upload image to azure

* format

* added users and groups to fixture (#731)

* made it possible to add members before and after registration open time (#733)

* made it possible to add members before and after registration open time

* can add for paid event

* format

* format

* Update CHANGELOG.md

* Activity (#736)

* first version

* changed ordering for activities

* filled out categiory enum

* fixed test

* fixed test again

* Update CHANGELOG.md

* Added filter for expired and upcoming events (#714)

* Added filter for expired and upcoming events

* Removed registration filter on event has ended

* Added manual filtering for expired events in user viewset

* Removed unused import

* Started testing expired event method

* Finished testing filter methode

* format

* removed incorrect True comparison

* Updated changlog

* Added tests where query params give false

* Used CaseInsensitiveBooleanQueryParam for handling all types of query params + removed comments

* Fixed typo

* Formatting

---------

Co-authored-by: Harry Linrui XU <[email protected]>
Co-authored-by: haruixu <[email protected]>

* fixed bug with added order. set the status to SALE. Added 400 status … (#742)

fixed bug with added order. set the status to SALE. Added 400 status for adding registration for existing user

* fixed issue expired events (#743)

* fixed issue expired events

* needs a fix

* fixed bugs

* format

* format

* fixed filtering

* feat(emojis): added emojis (#553)

* added emoji dependency

* created emoji app :feelsgood:

* removed unused files

* added emoji models, serializers and views

* added urls for emoji app :godmode:

* fixed models and added basic admin

* added view for unicode emojis

* ever closer to the end :shipit:

* fixed emoji serializers

* fixed model admin

* is ready? :shipit: :feelsgood:

* added comment for empty method

* removed type from str in CustomShortName

* ran make pr :shipit:

* Started developing UserNewsReaction

* Finished model and serializer. Created factory and started testing

* Added pytest.fixture for emoji and added it to test

* Finished tests for UserNewsReaction

* Removed unsused code and comments

* Removed line spacings

* ready for merging main into this branch

* fixed linting

* Changed read_access on reactions to only be members

* made news_emoji model, serializer and viewset

* added new tests and created a news-emoji factory

* Added realated names to news emojis and reactions

* Fixed some linting

* Added related name to reactions in news

* Added tests for both news reactions and toddel reactions and modified reactions so that they have to be allowed on a specific news or toddel

* Fixed test failures and added url support to reactions for toddel

* Changed changelog

* Removed potential cross-site scripting

* Removed remainding  potential cross-site scripting

* Refactured emoji backend and implemented reactions for unicode emojis

* Added a endpoint for retrieving if emojis is allowed on a news

* Cleaned up some code

* Added forgot import

* Fixed a bug

* Simplified the feature

* Added model, serializer and viewset for model News Reaction

* Made reactions use generic foreignkeys and added support for reactions to news

* Made tests for post and put a reaction on news and modyfied it so they pass

* Removed commented out code

* Fixed some bugs where content_type was not saved

* Modified the Reaction serializer and made a create and update serializer

* Cleaned up init files and simplyfied migrations

* Fixed conflict after merging dev

* Made enum for content types and removed unused code

* Updated update serializer to use the update method instead of create

* Modified tests and fixed update for reaction

* Made requested changes and added a test for changing other users reactions and made it pass

* Made requested changes

* Linting error from dev

* Fixed error from merging of dev

* Added a check so that a user can't create a reaction for another user

* cleanup

* fixed migration error

* Added reactions to event

* Removed unintential code

* added emojis_allowed for update and create serializer for event

* Removed unused code and linted

* added user information to reaction serializer

---------

Co-authored-by: Harry Linrui Xu <[email protected]>
Co-authored-by: Harry Linrui Xu <[email protected]>
Co-authored-by: Tobias Rødahl Thingnes <[email protected]>
Co-authored-by: Jarand Romestrand <[email protected]>
Co-authored-by: Tini Tran <[email protected]>
Co-authored-by: JarandJR <[email protected]>
Co-authored-by: Mads Nylund <[email protected]>
Co-authored-by: Mads Nylund <[email protected]>

* Fix Dev deployment (#744)

commit

* fixed migrations (#745)

* Update deploy_dev.yml

Updated to new registry

* Update AdminGroup enum value KOK to Kontkom (#746)

* fixed event filter (#747)

* refactored event serializer: update to free event only if there are n… (#722)

* refactored event serializer: update to free event only if there are no registrations

* first version finished

* format

* fixed task bug

* removed payment tests

* format

* Trigger Build

* removed order test that uses vipps api

* fixed celery task to delete registration if there are no orders

* when refunded, order status is updated to CANCEl in db

* added exceptions for refund

* format

* fixed bug with celery task when having several orders

* added search and filter in admin panel

* added 10 minutes to countdown task, so an user always will have the chance to pay

* refactored check payment function

* altered order payment check

* made test for vipps callback and checking if order status is successfull

* added check for status when fetching a payment order for a registration on an event

* made tests for updating and creating paid events

* Refactor event integration tests to use boolean truthiness

* Refactor payment serializers and views

* format

* format

* format

* fixed 500 error response and added vipps msn to env in docker

* Add payment expiration check and handling

* fixed bug with expired payment time

* removed write permission on Event for jubkom (#748)

* Update CHANGELOG.md (#749)

* merge

---------

Co-authored-by: Martin Clementz <[email protected]>
Co-authored-by: Thomas H. Svendal <[email protected]>
Co-authored-by: Anders <[email protected]>
Co-authored-by: Ester2109 <[email protected]>
Co-authored-by: Harry Linrui XU <[email protected]>
Co-authored-by: haruixu <[email protected]>
Co-authored-by: norgor <[email protected]>
Co-authored-by: Harry Linrui Xu <[email protected]>
Co-authored-by: Tobias Rødahl Thingnes <[email protected]>
Co-authored-by: Jarand Romestrand <[email protected]>
Co-authored-by: Tini Tran <[email protected]>
Co-authored-by: JarandJR <[email protected]>
thomsen85 added a commit that referenced this pull request Jan 15, 2024
January Update (#750)

* refactored exception for order init error (#712)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* Refactor(paid event)/rename exception (#717)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* changed name of exception

* Trigger Build

* notification for waiting list and when coming from waiting list (#725)

* use env variable for celery broker url (#726)

* chore: use env variable for celery broker url

* chore: set default env varibale if not configured

* Give HS user permissions (#727)

* Give HS user permissions

* Fix

* Update CHANGELOG.md

* Feat(event)/waitlist (#724)

* Fix(registration)/waitlist limit (#729)

* users from wait list get bumped up if event limit is increased, and users from queue get bumped down if the limit is decreased. Priority is respected

* format

* altered test with bigger dicrease, and to test if priority is respected

* added endpotint for manually adding members to an event (#730)

* added endpotint for manually adding members to an event

* format

* made migrations

* test for registration on wait list if event is full

* Feat(qr)/qr generator (#719)

* added model for QR code, viewset and serializer

* finished create and destroy methods, and mades tests for these

* altered create viewset to take user from request

* fixed tests

* changed status code for deletion of qr code to 200 since frontend dosent accept 204 status code....

* format

* removed earlier unused method

* format

* Trigger Build

* changed exception to take all errors with making a blob

* format

* added azure key to settings file

* format

* changed name of exception for blbo not found

* altered ci.yaml file to add azure connecntion string as env

* fix ci file

* changed model to take content, and serializer not upload image to azure

* format

* added users and groups to fixture (#731)

* made it possible to add members before and after registration open time (#733)

* made it possible to add members before and after registration open time

* can add for paid event

* format

* format

* Update CHANGELOG.md

* Activity (#736)

* first version

* changed ordering for activities

* filled out categiory enum

* fixed test

* fixed test again

* Update CHANGELOG.md

* Added filter for expired and upcoming events (#714)

* Added filter for expired and upcoming events

* Removed registration filter on event has ended

* Added manual filtering for expired events in user viewset

* Removed unused import

* Started testing expired event method

* Finished testing filter methode

* format

* removed incorrect True comparison

* Updated changlog

* Added tests where query params give false

* Used CaseInsensitiveBooleanQueryParam for handling all types of query params + removed comments

* Fixed typo

* Formatting

---------




* fixed bug with added order. set the status to SALE. Added 400 status … (#742)

fixed bug with added order. set the status to SALE. Added 400 status for adding registration for existing user

* fixed issue expired events (#743)

* fixed issue expired events

* needs a fix

* fixed bugs

* format

* format

* fixed filtering

* feat(emojis): added emojis (#553)

* added emoji dependency

* created emoji app :feelsgood:

* removed unused files

* added emoji models, serializers and views

* added urls for emoji app :godmode:

* fixed models and added basic admin

* added view for unicode emojis

* ever closer to the end :shipit:

* fixed emoji serializers

* fixed model admin

* is ready? :shipit: :feelsgood:

* added comment for empty method

* removed type from str in CustomShortName

* ran make pr :shipit:

* Started developing UserNewsReaction

* Finished model and serializer. Created factory and started testing

* Added pytest.fixture for emoji and added it to test

* Finished tests for UserNewsReaction

* Removed unsused code and comments

* Removed line spacings

* ready for merging main into this branch

* fixed linting

* Changed read_access on reactions to only be members

* made news_emoji model, serializer and viewset

* added new tests and created a news-emoji factory

* Added realated names to news emojis and reactions

* Fixed some linting

* Added related name to reactions in news

* Added tests for both news reactions and toddel reactions and modified reactions so that they have to be allowed on a specific news or toddel

* Fixed test failures and added url support to reactions for toddel

* Changed changelog

* Removed potential cross-site scripting

* Removed remainding  potential cross-site scripting

* Refactured emoji backend and implemented reactions for unicode emojis

* Added a endpoint for retrieving if emojis is allowed on a news

* Cleaned up some code

* Added forgot import

* Fixed a bug

* Simplified the feature

* Added model, serializer and viewset for model News Reaction

* Made reactions use generic foreignkeys and added support for reactions to news

* Made tests for post and put a reaction on news and modyfied it so they pass

* Removed commented out code

* Fixed some bugs where content_type was not saved

* Modified the Reaction serializer and made a create and update serializer

* Cleaned up init files and simplyfied migrations

* Fixed conflict after merging dev

* Made enum for content types and removed unused code

* Updated update serializer to use the update method instead of create

* Modified tests and fixed update for reaction

* Made requested changes and added a test for changing other users reactions and made it pass

* Made requested changes

* Linting error from dev

* Fixed error from merging of dev

* Added a check so that a user can't create a reaction for another user

* cleanup

* fixed migration error

* Added reactions to event

* Removed unintential code

* added emojis_allowed for update and create serializer for event

* Removed unused code and linted

* added user information to reaction serializer

---------










* Fix Dev deployment (#744)

commit

* fixed migrations (#745)

* Update deploy_dev.yml

Updated to new registry

* Update AdminGroup enum value KOK to Kontkom (#746)

* fixed event filter (#747)

* refactored event serializer: update to free event only if there are n… (#722)

* refactored event serializer: update to free event only if there are no registrations

* first version finished

* format

* fixed task bug

* removed payment tests

* format

* Trigger Build

* removed order test that uses vipps api

* fixed celery task to delete registration if there are no orders

* when refunded, order status is updated to CANCEl in db

* added exceptions for refund

* format

* fixed bug with celery task when having several orders

* added search and filter in admin panel

* added 10 minutes to countdown task, so an user always will have the chance to pay

* refactored check payment function

* altered order payment check

* made test for vipps callback and checking if order status is successfull

* added check for status when fetching a payment order for a registration on an event

* made tests for updating and creating paid events

* Refactor event integration tests to use boolean truthiness

* Refactor payment serializers and views

* format

* format

* format

* fixed 500 error response and added vipps msn to env in docker

* Add payment expiration check and handling

* fixed bug with expired payment time

* removed write permission on Event for jubkom (#748)

* Update CHANGELOG.md (#749)

* merge

---------

Co-authored-by: Mads Nylund <[email protected]>
Co-authored-by: Martin Clementz <[email protected]>
Co-authored-by: Anders <[email protected]>
Co-authored-by: Ester2109 <[email protected]>
Co-authored-by: Harry Linrui XU <[email protected]>
Co-authored-by: haruixu <[email protected]>
Co-authored-by: norgor <[email protected]>
Co-authored-by: Harry Linrui Xu <[email protected]>
Co-authored-by: Tobias Rødahl Thingnes <[email protected]>
Co-authored-by: Jarand Romestrand <[email protected]>
Co-authored-by: Tini Tran <[email protected]>
Co-authored-by: JarandJR <[email protected]>
MadsNyl added a commit that referenced this pull request Jan 15, 2024
* refactored exception for order init error (#712)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* Refactor(paid event)/rename exception (#717)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* changed name of exception

* Trigger Build

* notification for waiting list and when coming from waiting list (#725)

* use env variable for celery broker url (#726)

* chore: use env variable for celery broker url

* chore: set default env varibale if not configured

* Give HS user permissions (#727)

* Give HS user permissions

* Fix

* Update CHANGELOG.md

* Feat(event)/waitlist (#724)

* Fix(registration)/waitlist limit (#729)

* users from wait list get bumped up if event limit is increased, and users from queue get bumped down if the limit is decreased. Priority is respected

* format

* altered test with bigger dicrease, and to test if priority is respected

* added endpotint for manually adding members to an event (#730)

* added endpotint for manually adding members to an event

* format

* made migrations

* test for registration on wait list if event is full

* Feat(qr)/qr generator (#719)

* added model for QR code, viewset and serializer

* finished create and destroy methods, and mades tests for these

* altered create viewset to take user from request

* fixed tests

* changed status code for deletion of qr code to 200 since frontend dosent accept 204 status code....

* format

* removed earlier unused method

* format

* Trigger Build

* changed exception to take all errors with making a blob

* format

* added azure key to settings file

* format

* changed name of exception for blbo not found

* altered ci.yaml file to add azure connecntion string as env

* fix ci file

* changed model to take content, and serializer not upload image to azure

* format

* added users and groups to fixture (#731)

* made it possible to add members before and after registration open time (#733)

* made it possible to add members before and after registration open time

* can add for paid event

* format

* format

* Update CHANGELOG.md

* Activity (#736)

* first version

* changed ordering for activities

* filled out categiory enum

* fixed test

* fixed test again

* Update CHANGELOG.md

* Added filter for expired and upcoming events (#714)

* Added filter for expired and upcoming events

* Removed registration filter on event has ended

* Added manual filtering for expired events in user viewset

* Removed unused import

* Started testing expired event method

* Finished testing filter methode

* format

* removed incorrect True comparison

* Updated changlog

* Added tests where query params give false

* Used CaseInsensitiveBooleanQueryParam for handling all types of query params + removed comments

* Fixed typo

* Formatting

---------

Co-authored-by: Harry Linrui XU <[email protected]>
Co-authored-by: haruixu <[email protected]>

* fixed bug with added order. set the status to SALE. Added 400 status … (#742)

fixed bug with added order. set the status to SALE. Added 400 status for adding registration for existing user

* fixed issue expired events (#743)

* fixed issue expired events

* needs a fix

* fixed bugs

* format

* format

* fixed filtering

* feat(emojis): added emojis (#553)

* added emoji dependency

* created emoji app :feelsgood:

* removed unused files

* added emoji models, serializers and views

* added urls for emoji app :godmode:

* fixed models and added basic admin

* added view for unicode emojis

* ever closer to the end :shipit:

* fixed emoji serializers

* fixed model admin

* is ready? :shipit: :feelsgood:

* added comment for empty method

* removed type from str in CustomShortName

* ran make pr :shipit:

* Started developing UserNewsReaction

* Finished model and serializer. Created factory and started testing

* Added pytest.fixture for emoji and added it to test

* Finished tests for UserNewsReaction

* Removed unsused code and comments

* Removed line spacings

* ready for merging main into this branch

* fixed linting

* Changed read_access on reactions to only be members

* made news_emoji model, serializer and viewset

* added new tests and created a news-emoji factory

* Added realated names to news emojis and reactions

* Fixed some linting

* Added related name to reactions in news

* Added tests for both news reactions and toddel reactions and modified reactions so that they have to be allowed on a specific news or toddel

* Fixed test failures and added url support to reactions for toddel

* Changed changelog

* Removed potential cross-site scripting

* Removed remainding  potential cross-site scripting

* Refactured emoji backend and implemented reactions for unicode emojis

* Added a endpoint for retrieving if emojis is allowed on a news

* Cleaned up some code

* Added forgot import

* Fixed a bug

* Simplified the feature

* Added model, serializer and viewset for model News Reaction

* Made reactions use generic foreignkeys and added support for reactions to news

* Made tests for post and put a reaction on news and modyfied it so they pass

* Removed commented out code

* Fixed some bugs where content_type was not saved

* Modified the Reaction serializer and made a create and update serializer

* Cleaned up init files and simplyfied migrations

* Fixed conflict after merging dev

* Made enum for content types and removed unused code

* Updated update serializer to use the update method instead of create

* Modified tests and fixed update for reaction

* Made requested changes and added a test for changing other users reactions and made it pass

* Made requested changes

* Linting error from dev

* Fixed error from merging of dev

* Added a check so that a user can't create a reaction for another user

* cleanup

* fixed migration error

* Added reactions to event

* Removed unintential code

* added emojis_allowed for update and create serializer for event

* Removed unused code and linted

* added user information to reaction serializer

---------

Co-authored-by: Harry Linrui Xu <[email protected]>
Co-authored-by: Harry Linrui Xu <[email protected]>
Co-authored-by: Tobias Rødahl Thingnes <[email protected]>
Co-authored-by: Jarand Romestrand <[email protected]>
Co-authored-by: Tini Tran <[email protected]>
Co-authored-by: JarandJR <[email protected]>
Co-authored-by: Mads Nylund <[email protected]>
Co-authored-by: Mads Nylund <[email protected]>

* Fix Dev deployment (#744)

commit

* fixed migrations (#745)

* Update deploy_dev.yml

Updated to new registry

* Update AdminGroup enum value KOK to Kontkom (#746)

* fixed event filter (#747)

* refactored event serializer: update to free event only if there are n… (#722)

* refactored event serializer: update to free event only if there are no registrations

* first version finished

* format

* fixed task bug

* removed payment tests

* format

* Trigger Build

* removed order test that uses vipps api

* fixed celery task to delete registration if there are no orders

* when refunded, order status is updated to CANCEl in db

* added exceptions for refund

* format

* fixed bug with celery task when having several orders

* added search and filter in admin panel

* added 10 minutes to countdown task, so an user always will have the chance to pay

* refactored check payment function

* altered order payment check

* made test for vipps callback and checking if order status is successfull

* added check for status when fetching a payment order for a registration on an event

* made tests for updating and creating paid events

* Refactor event integration tests to use boolean truthiness

* Refactor payment serializers and views

* format

* format

* format

* fixed 500 error response and added vipps msn to env in docker

* Add payment expiration check and handling

* fixed bug with expired payment time

* removed write permission on Event for jubkom (#748)

* Update CHANGELOG.md (#749)

* merge

* QUICKFIX/master into main (#751)

January Update (#750)

* refactored exception for order init error (#712)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* Refactor(paid event)/rename exception (#717)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* changed name of exception

* Trigger Build

* notification for waiting list and when coming from waiting list (#725)

* use env variable for celery broker url (#726)

* chore: use env variable for celery broker url

* chore: set default env varibale if not configured

* Give HS user permissions (#727)

* Give HS user permissions

* Fix

* Update CHANGELOG.md

* Feat(event)/waitlist (#724)

* Fix(registration)/waitlist limit (#729)

* users from wait list get bumped up if event limit is increased, and users from queue get bumped down if the limit is decreased. Priority is respected

* format

* altered test with bigger dicrease, and to test if priority is respected

* added endpotint for manually adding members to an event (#730)

* added endpotint for manually adding members to an event

* format

* made migrations

* test for registration on wait list if event is full

* Feat(qr)/qr generator (#719)

* added model for QR code, viewset and serializer

* finished create and destroy methods, and mades tests for these

* altered create viewset to take user from request

* fixed tests

* changed status code for deletion of qr code to 200 since frontend dosent accept 204 status code....

* format

* removed earlier unused method

* format

* Trigger Build

* changed exception to take all errors with making a blob

* format

* added azure key to settings file

* format

* changed name of exception for blbo not found

* altered ci.yaml file to add azure connecntion string as env

* fix ci file

* changed model to take content, and serializer not upload image to azure

* format

* added users and groups to fixture (#731)

* made it possible to add members before and after registration open time (#733)

* made it possible to add members before and after registration open time

* can add for paid event

* format

* format

* Update CHANGELOG.md

* Activity (#736)

* first version

* changed ordering for activities

* filled out categiory enum

* fixed test

* fixed test again

* Update CHANGELOG.md

* Added filter for expired and upcoming events (#714)

* Added filter for expired and upcoming events

* Removed registration filter on event has ended

* Added manual filtering for expired events in user viewset

* Removed unused import

* Started testing expired event method

* Finished testing filter methode

* format

* removed incorrect True comparison

* Updated changlog

* Added tests where query params give false

* Used CaseInsensitiveBooleanQueryParam for handling all types of query params + removed comments

* Fixed typo

* Formatting

---------




* fixed bug with added order. set the status to SALE. Added 400 status … (#742)

fixed bug with added order. set the status to SALE. Added 400 status for adding registration for existing user

* fixed issue expired events (#743)

* fixed issue expired events

* needs a fix

* fixed bugs

* format

* format

* fixed filtering

* feat(emojis): added emojis (#553)

* added emoji dependency

* created emoji app :feelsgood:

* removed unused files

* added emoji models, serializers and views

* added urls for emoji app :godmode:

* fixed models and added basic admin

* added view for unicode emojis

* ever closer to the end :shipit:

* fixed emoji serializers

* fixed model admin

* is ready? :shipit: :feelsgood:

* added comment for empty method

* removed type from str in CustomShortName

* ran make pr :shipit:

* Started developing UserNewsReaction

* Finished model and serializer. Created factory and started testing

* Added pytest.fixture for emoji and added it to test

* Finished tests for UserNewsReaction

* Removed unsused code and comments

* Removed line spacings

* ready for merging main into this branch

* fixed linting

* Changed read_access on reactions to only be members

* made news_emoji model, serializer and viewset

* added new tests and created a news-emoji factory

* Added realated names to news emojis and reactions

* Fixed some linting

* Added related name to reactions in news

* Added tests for both news reactions and toddel reactions and modified reactions so that they have to be allowed on a specific news or toddel

* Fixed test failures and added url support to reactions for toddel

* Changed changelog

* Removed potential cross-site scripting

* Removed remainding  potential cross-site scripting

* Refactured emoji backend and implemented reactions for unicode emojis

* Added a endpoint for retrieving if emojis is allowed on a news

* Cleaned up some code

* Added forgot import

* Fixed a bug

* Simplified the feature

* Added model, serializer and viewset for model News Reaction

* Made reactions use generic foreignkeys and added support for reactions to news

* Made tests for post and put a reaction on news and modyfied it so they pass

* Removed commented out code

* Fixed some bugs where content_type was not saved

* Modified the Reaction serializer and made a create and update serializer

* Cleaned up init files and simplyfied migrations

* Fixed conflict after merging dev

* Made enum for content types and removed unused code

* Updated update serializer to use the update method instead of create

* Modified tests and fixed update for reaction

* Made requested changes and added a test for changing other users reactions and made it pass

* Made requested changes

* Linting error from dev

* Fixed error from merging of dev

* Added a check so that a user can't create a reaction for another user

* cleanup

* fixed migration error

* Added reactions to event

* Removed unintential code

* added emojis_allowed for update and create serializer for event

* Removed unused code and linted

* added user information to reaction serializer

---------










* Fix Dev deployment (#744)

commit

* fixed migrations (#745)

* Update deploy_dev.yml

Updated to new registry

* Update AdminGroup enum value KOK to Kontkom (#746)

* fixed event filter (#747)

* refactored event serializer: update to free event only if there are n… (#722)

* refactored event serializer: update to free event only if there are no registrations

* first version finished

* format

* fixed task bug

* removed payment tests

* format

* Trigger Build

* removed order test that uses vipps api

* fixed celery task to delete registration if there are no orders

* when refunded, order status is updated to CANCEl in db

* added exceptions for refund

* format

* fixed bug with celery task when having several orders

* added search and filter in admin panel

* added 10 minutes to countdown task, so an user always will have the chance to pay

* refactored check payment function

* altered order payment check

* made test for vipps callback and checking if order status is successfull

* added check for status when fetching a payment order for a registration on an event

* made tests for updating and creating paid events

* Refactor event integration tests to use boolean truthiness

* Refactor payment serializers and views

* format

* format

* format

* fixed 500 error response and added vipps msn to env in docker

* Add payment expiration check and handling

* fixed bug with expired payment time

* removed write permission on Event for jubkom (#748)

* Update CHANGELOG.md (#749)

* merge

---------

Co-authored-by: Mads Nylund <[email protected]>
Co-authored-by: Martin Clementz <[email protected]>
Co-authored-by: Anders <[email protected]>
Co-authored-by: Ester2109 <[email protected]>
Co-authored-by: Harry Linrui XU <[email protected]>
Co-authored-by: haruixu <[email protected]>
Co-authored-by: norgor <[email protected]>
Co-authored-by: Harry Linrui Xu <[email protected]>
Co-authored-by: Tobias Rødahl Thingnes <[email protected]>
Co-authored-by: Jarand Romestrand <[email protected]>
Co-authored-by: Tini Tran <[email protected]>
Co-authored-by: JarandJR <[email protected]>

* Fix(event)/expired shows activities (#753)

* fixed issue expired events

* needs a fix

* fixed bugs

* format

* format

---------

Co-authored-by: Mads Nylund <[email protected]>
Co-authored-by: Martin Clementz <[email protected]>
Co-authored-by: Anders <[email protected]>
Co-authored-by: Mads Nylund <[email protected]>
Co-authored-by: Ester2109 <[email protected]>
Co-authored-by: Harry Linrui XU <[email protected]>
Co-authored-by: haruixu <[email protected]>
Co-authored-by: norgor <[email protected]>
Co-authored-by: Harry Linrui Xu <[email protected]>
Co-authored-by: Tobias Rødahl Thingnes <[email protected]>
Co-authored-by: Jarand Romestrand <[email protected]>
Co-authored-by: Tini Tran <[email protected]>
Co-authored-by: JarandJR <[email protected]>
martcl added a commit that referenced this pull request Jan 16, 2024
* January Update (#750)

* refactored exception for order init error (#712)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* Refactor(paid event)/rename exception (#717)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* changed name of exception

* Trigger Build

* notification for waiting list and when coming from waiting list (#725)

* use env variable for celery broker url (#726)

* chore: use env variable for celery broker url

* chore: set default env varibale if not configured

* Give HS user permissions (#727)

* Give HS user permissions

* Fix

* Update CHANGELOG.md

* Feat(event)/waitlist (#724)

* Fix(registration)/waitlist limit (#729)

* users from wait list get bumped up if event limit is increased, and users from queue get bumped down if the limit is decreased. Priority is respected

* format

* altered test with bigger dicrease, and to test if priority is respected

* added endpotint for manually adding members to an event (#730)

* added endpotint for manually adding members to an event

* format

* made migrations

* test for registration on wait list if event is full

* Feat(qr)/qr generator (#719)

* added model for QR code, viewset and serializer

* finished create and destroy methods, and mades tests for these

* altered create viewset to take user from request

* fixed tests

* changed status code for deletion of qr code to 200 since frontend dosent accept 204 status code....

* format

* removed earlier unused method

* format

* Trigger Build

* changed exception to take all errors with making a blob

* format

* added azure key to settings file

* format

* changed name of exception for blbo not found

* altered ci.yaml file to add azure connecntion string as env

* fix ci file

* changed model to take content, and serializer not upload image to azure

* format

* added users and groups to fixture (#731)

* made it possible to add members before and after registration open time (#733)

* made it possible to add members before and after registration open time

* can add for paid event

* format

* format

* Update CHANGELOG.md

* Activity (#736)

* first version

* changed ordering for activities

* filled out categiory enum

* fixed test

* fixed test again

* Update CHANGELOG.md

* Added filter for expired and upcoming events (#714)

* Added filter for expired and upcoming events

* Removed registration filter on event has ended

* Added manual filtering for expired events in user viewset

* Removed unused import

* Started testing expired event method

* Finished testing filter methode

* format

* removed incorrect True comparison

* Updated changlog

* Added tests where query params give false

* Used CaseInsensitiveBooleanQueryParam for handling all types of query params + removed comments

* Fixed typo

* Formatting

---------

Co-authored-by: Harry Linrui XU <[email protected]>
Co-authored-by: haruixu <[email protected]>

* fixed bug with added order. set the status to SALE. Added 400 status … (#742)

fixed bug with added order. set the status to SALE. Added 400 status for adding registration for existing user

* fixed issue expired events (#743)

* fixed issue expired events

* needs a fix

* fixed bugs

* format

* format

* fixed filtering

* feat(emojis): added emojis (#553)

* added emoji dependency

* created emoji app :feelsgood:

* removed unused files

* added emoji models, serializers and views

* added urls for emoji app :godmode:

* fixed models and added basic admin

* added view for unicode emojis

* ever closer to the end :shipit:

* fixed emoji serializers

* fixed model admin

* is ready? :shipit: :feelsgood:

* added comment for empty method

* removed type from str in CustomShortName

* ran make pr :shipit:

* Started developing UserNewsReaction

* Finished model and serializer. Created factory and started testing

* Added pytest.fixture for emoji and added it to test

* Finished tests for UserNewsReaction

* Removed unsused code and comments

* Removed line spacings

* ready for merging main into this branch

* fixed linting

* Changed read_access on reactions to only be members

* made news_emoji model, serializer and viewset

* added new tests and created a news-emoji factory

* Added realated names to news emojis and reactions

* Fixed some linting

* Added related name to reactions in news

* Added tests for both news reactions and toddel reactions and modified reactions so that they have to be allowed on a specific news or toddel

* Fixed test failures and added url support to reactions for toddel

* Changed changelog

* Removed potential cross-site scripting

* Removed remainding  potential cross-site scripting

* Refactured emoji backend and implemented reactions for unicode emojis

* Added a endpoint for retrieving if emojis is allowed on a news

* Cleaned up some code

* Added forgot import

* Fixed a bug

* Simplified the feature

* Added model, serializer and viewset for model News Reaction

* Made reactions use generic foreignkeys and added support for reactions to news

* Made tests for post and put a reaction on news and modyfied it so they pass

* Removed commented out code

* Fixed some bugs where content_type was not saved

* Modified the Reaction serializer and made a create and update serializer

* Cleaned up init files and simplyfied migrations

* Fixed conflict after merging dev

* Made enum for content types and removed unused code

* Updated update serializer to use the update method instead of create

* Modified tests and fixed update for reaction

* Made requested changes and added a test for changing other users reactions and made it pass

* Made requested changes

* Linting error from dev

* Fixed error from merging of dev

* Added a check so that a user can't create a reaction for another user

* cleanup

* fixed migration error

* Added reactions to event

* Removed unintential code

* added emojis_allowed for update and create serializer for event

* Removed unused code and linted

* added user information to reaction serializer

---------

Co-authored-by: Harry Linrui Xu <[email protected]>
Co-authored-by: Harry Linrui Xu <[email protected]>
Co-authored-by: Tobias Rødahl Thingnes <[email protected]>
Co-authored-by: Jarand Romestrand <[email protected]>
Co-authored-by: Tini Tran <[email protected]>
Co-authored-by: JarandJR <[email protected]>
Co-authored-by: Mads Nylund <[email protected]>
Co-authored-by: Mads Nylund <[email protected]>

* Fix Dev deployment (#744)

commit

* fixed migrations (#745)

* Update deploy_dev.yml

Updated to new registry

* Update AdminGroup enum value KOK to Kontkom (#746)

* fixed event filter (#747)

* refactored event serializer: update to free event only if there are n… (#722)

* refactored event serializer: update to free event only if there are no registrations

* first version finished

* format

* fixed task bug

* removed payment tests

* format

* Trigger Build

* removed order test that uses vipps api

* fixed celery task to delete registration if there are no orders

* when refunded, order status is updated to CANCEl in db

* added exceptions for refund

* format

* fixed bug with celery task when having several orders

* added search and filter in admin panel

* added 10 minutes to countdown task, so an user always will have the chance to pay

* refactored check payment function

* altered order payment check

* made test for vipps callback and checking if order status is successfull

* added check for status when fetching a payment order for a registration on an event

* made tests for updating and creating paid events

* Refactor event integration tests to use boolean truthiness

* Refactor payment serializers and views

* format

* format

* format

* fixed 500 error response and added vipps msn to env in docker

* Add payment expiration check and handling

* fixed bug with expired payment time

* removed write permission on Event for jubkom (#748)

* Update CHANGELOG.md (#749)

* merge

---------

Co-authored-by: Martin Clementz <[email protected]>
Co-authored-by: Thomas H. Svendal <[email protected]>
Co-authored-by: Anders <[email protected]>
Co-authored-by: Ester2109 <[email protected]>
Co-authored-by: Harry Linrui XU <[email protected]>
Co-authored-by: haruixu <[email protected]>
Co-authored-by: norgor <[email protected]>
Co-authored-by: Harry Linrui Xu <[email protected]>
Co-authored-by: Tobias Rødahl Thingnes <[email protected]>
Co-authored-by: Jarand Romestrand <[email protected]>
Co-authored-by: Tini Tran <[email protected]>
Co-authored-by: JarandJR <[email protected]>

* Test (#752)

* refactored exception for order init error (#712)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* Refactor(paid event)/rename exception (#717)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* changed name of exception

* Trigger Build

* notification for waiting list and when coming from waiting list (#725)

* use env variable for celery broker url (#726)

* chore: use env variable for celery broker url

* chore: set default env varibale if not configured

* Give HS user permissions (#727)

* Give HS user permissions

* Fix

* Update CHANGELOG.md

* Feat(event)/waitlist (#724)

* Fix(registration)/waitlist limit (#729)

* users from wait list get bumped up if event limit is increased, and users from queue get bumped down if the limit is decreased. Priority is respected

* format

* altered test with bigger dicrease, and to test if priority is respected

* added endpotint for manually adding members to an event (#730)

* added endpotint for manually adding members to an event

* format

* made migrations

* test for registration on wait list if event is full

* Feat(qr)/qr generator (#719)

* added model for QR code, viewset and serializer

* finished create and destroy methods, and mades tests for these

* altered create viewset to take user from request

* fixed tests

* changed status code for deletion of qr code to 200 since frontend dosent accept 204 status code....

* format

* removed earlier unused method

* format

* Trigger Build

* changed exception to take all errors with making a blob

* format

* added azure key to settings file

* format

* changed name of exception for blbo not found

* altered ci.yaml file to add azure connecntion string as env

* fix ci file

* changed model to take content, and serializer not upload image to azure

* format

* added users and groups to fixture (#731)

* made it possible to add members before and after registration open time (#733)

* made it possible to add members before and after registration open time

* can add for paid event

* format

* format

* Update CHANGELOG.md

* Activity (#736)

* first version

* changed ordering for activities

* filled out categiory enum

* fixed test

* fixed test again

* Update CHANGELOG.md

* Added filter for expired and upcoming events (#714)

* Added filter for expired and upcoming events

* Removed registration filter on event has ended

* Added manual filtering for expired events in user viewset

* Removed unused import

* Started testing expired event method

* Finished testing filter methode

* format

* removed incorrect True comparison

* Updated changlog

* Added tests where query params give false

* Used CaseInsensitiveBooleanQueryParam for handling all types of query params + removed comments

* Fixed typo

* Formatting

---------

Co-authored-by: Harry Linrui XU <[email protected]>
Co-authored-by: haruixu <[email protected]>

* fixed bug with added order. set the status to SALE. Added 400 status … (#742)

fixed bug with added order. set the status to SALE. Added 400 status for adding registration for existing user

* fixed issue expired events (#743)

* fixed issue expired events

* needs a fix

* fixed bugs

* format

* format

* fixed filtering

* feat(emojis): added emojis (#553)

* added emoji dependency

* created emoji app :feelsgood:

* removed unused files

* added emoji models, serializers and views

* added urls for emoji app :godmode:

* fixed models and added basic admin

* added view for unicode emojis

* ever closer to the end :shipit:

* fixed emoji serializers

* fixed model admin

* is ready? :shipit: :feelsgood:

* added comment for empty method

* removed type from str in CustomShortName

* ran make pr :shipit:

* Started developing UserNewsReaction

* Finished model and serializer. Created factory and started testing

* Added pytest.fixture for emoji and added it to test

* Finished tests for UserNewsReaction

* Removed unsused code and comments

* Removed line spacings

* ready for merging main into this branch

* fixed linting

* Changed read_access on reactions to only be members

* made news_emoji model, serializer and viewset

* added new tests and created a news-emoji factory

* Added realated names to news emojis and reactions

* Fixed some linting

* Added related name to reactions in news

* Added tests for both news reactions and toddel reactions and modified reactions so that they have to be allowed on a specific news or toddel

* Fixed test failures and added url support to reactions for toddel

* Changed changelog

* Removed potential cross-site scripting

* Removed remainding  potential cross-site scripting

* Refactured emoji backend and implemented reactions for unicode emojis

* Added a endpoint for retrieving if emojis is allowed on a news

* Cleaned up some code

* Added forgot import

* Fixed a bug

* Simplified the feature

* Added model, serializer and viewset for model News Reaction

* Made reactions use generic foreignkeys and added support for reactions to news

* Made tests for post and put a reaction on news and modyfied it so they pass

* Removed commented out code

* Fixed some bugs where content_type was not saved

* Modified the Reaction serializer and made a create and update serializer

* Cleaned up init files and simplyfied migrations

* Fixed conflict after merging dev

* Made enum for content types and removed unused code

* Updated update serializer to use the update method instead of create

* Modified tests and fixed update for reaction

* Made requested changes and added a test for changing other users reactions and made it pass

* Made requested changes

* Linting error from dev

* Fixed error from merging of dev

* Added a check so that a user can't create a reaction for another user

* cleanup

* fixed migration error

* Added reactions to event

* Removed unintential code

* added emojis_allowed for update and create serializer for event

* Removed unused code and linted

* added user information to reaction serializer

---------

Co-authored-by: Harry Linrui Xu <[email protected]>
Co-authored-by: Harry Linrui Xu <[email protected]>
Co-authored-by: Tobias Rødahl Thingnes <[email protected]>
Co-authored-by: Jarand Romestrand <[email protected]>
Co-authored-by: Tini Tran <[email protected]>
Co-authored-by: JarandJR <[email protected]>
Co-authored-by: Mads Nylund <[email protected]>
Co-authored-by: Mads Nylund <[email protected]>

* Fix Dev deployment (#744)

commit

* fixed migrations (#745)

* Update deploy_dev.yml

Updated to new registry

* Update AdminGroup enum value KOK to Kontkom (#746)

* fixed event filter (#747)

* refactored event serializer: update to free event only if there are n… (#722)

* refactored event serializer: update to free event only if there are no registrations

* first version finished

* format

* fixed task bug

* removed payment tests

* format

* Trigger Build

* removed order test that uses vipps api

* fixed celery task to delete registration if there are no orders

* when refunded, order status is updated to CANCEl in db

* added exceptions for refund

* format

* fixed bug with celery task when having several orders

* added search and filter in admin panel

* added 10 minutes to countdown task, so an user always will have the chance to pay

* refactored check payment function

* altered order payment check

* made test for vipps callback and checking if order status is successfull

* added check for status when fetching a payment order for a registration on an event

* made tests for updating and creating paid events

* Refactor event integration tests to use boolean truthiness

* Refactor payment serializers and views

* format

* format

* format

* fixed 500 error response and added vipps msn to env in docker

* Add payment expiration check and handling

* fixed bug with expired payment time

* removed write permission on Event for jubkom (#748)

* Update CHANGELOG.md (#749)

* merge

* QUICKFIX/master into main (#751)

January Update (#750)

* refactored exception for order init error (#712)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* Refactor(paid event)/rename exception (#717)

* refactored exception for order init error

* added error when trying to update a paid event to a free event

* changed name of exception

* Trigger Build

* notification for waiting list and when coming from waiting list (#725)

* use env variable for celery broker url (#726)

* chore: use env variable for celery broker url

* chore: set default env varibale if not configured

* Give HS user permissions (#727)

* Give HS user permissions

* Fix

* Update CHANGELOG.md

* Feat(event)/waitlist (#724)

* Fix(registration)/waitlist limit (#729)

* users from wait list get bumped up if event limit is increased, and users from queue get bumped down if the limit is decreased. Priority is respected

* format

* altered test with bigger dicrease, and to test if priority is respected

* added endpotint for manually adding members to an event (#730)

* added endpotint for manually adding members to an event

* format

* made migrations

* test for registration on wait list if event is full

* Feat(qr)/qr generator (#719)

* added model for QR code, viewset and serializer

* finished create and destroy methods, and mades tests for these

* altered create viewset to take user from request

* fixed tests

* changed status code for deletion of qr code to 200 since frontend dosent accept 204 status code....

* format

* removed earlier unused method

* format

* Trigger Build

* changed exception to take all errors with making a blob

* format

* added azure key to settings file

* format

* changed name of exception for blbo not found

* altered ci.yaml file to add azure connecntion string as env

* fix ci file

* changed model to take content, and serializer not upload image to azure

* format

* added users and groups to fixture (#731)

* made it possible to add members before and after registration open time (#733)

* made it possible to add members before and after registration open time

* can add for paid event

* format

* format

* Update CHANGELOG.md

* Activity (#736)

* first version

* changed ordering for activities

* filled out categiory enum

* fixed test

* fixed test again

* Update CHANGELOG.md

* Added filter for expired and upcoming events (#714)

* Added filter for expired and upcoming events

* Removed registration filter on event has ended

* Added manual filtering for expired events in user viewset

* Removed unused import

* Started testing expired event method

* Finished testing filter methode

* format

* removed incorrect True comparison

* Updated changlog

* Added tests where query params give false

* Used CaseInsensitiveBooleanQueryParam for handling all types of query params + removed comments

* Fixed typo

* Formatting

---------




* fixed bug with added order. set the status to SALE. Added 400 status … (#742)

fixed bug with added order. set the status to SALE. Added 400 status for adding registration for existing user

* fixed issue expired events (#743)

* fixed issue expired events

* needs a fix

* fixed bugs

* format

* format

* fixed filtering

* feat(emojis): added emojis (#553)

* added emoji dependency

* created emoji app :feelsgood:

* removed unused files

* added emoji models, serializers and views

* added urls for emoji app :godmode:

* fixed models and added basic admin

* added view for unicode emojis

* ever closer to the end :shipit:

* fixed emoji serializers

* fixed model admin

* is ready? :shipit: :feelsgood:

* added comment for empty method

* removed type from str in CustomShortName

* ran make pr :shipit:

* Started developing UserNewsReaction

* Finished model and serializer. Created factory and started testing

* Added pytest.fixture for emoji and added it to test

* Finished tests for UserNewsReaction

* Removed unsused code and comments

* Removed line spacings

* ready for merging main into this branch

* fixed linting

* Changed read_access on reactions to only be members

* made news_emoji model, serializer and viewset

* added new tests and created a news-emoji factory

* Added realated names to news emojis and reactions

* Fixed some linting

* Added related name to reactions in news

* Added tests for both news reactions and toddel reactions and modified reactions so that they have to be allowed on a specific news or toddel

* Fixed test failures and added url support to reactions for toddel

* Changed changelog

* Removed potential cross-site scripting

* Removed remainding  potential cross-site scripting

* Refactured emoji backend and implemented reactions for unicode emojis

* Added a endpoint for retrieving if emojis is allowed on a news

* Cleaned up some code

* Added forgot import

* Fixed a bug

* Simplified the feature

* Added model, serializer and viewset for model News Reaction

* Made reactions use generic foreignkeys and added support for reactions to news

* Made tests for post and put a reaction on news and modyfied it so they pass

* Removed commented out code

* Fixed some bugs where content_type was not saved

* Modified the Reaction serializer and made a create and update serializer

* Cleaned up init files and simplyfied migrations

* Fixed conflict after merging dev

* Made enum for content types and removed unused code

* Updated update serializer to use the update method instead of create

* Modified tests and fixed update for reaction

* Made requested changes and added a test for changing other users reactions and made it pass

* Made requested changes

* Linting error from dev

* Fixed error from merging of dev

* Added a check so that a user can't create a reaction for another user

* cleanup

* fixed migration error

* Added reactions to event

* Removed unintential code

* added emojis_allowed for update and create serializer for event

* Removed unused code and linted

* added user information to reaction serializer

---------










* Fix Dev deployment (#744)

commit

* fixed migrations (#745)

* Update deploy_dev.yml

Updated to new registry

* Update AdminGroup enum value KOK to Kontkom (#746)

* fixed event filter (#747)

* refactored event serializer: update to free event only if there are n… (#722)

* refactored event serializer: update to free event only if there are no registrations

* first version finished

* format

* fixed task bug

* removed payment tests

* format

* Trigger Build

* removed order test that uses vipps api

* fixed celery task to delete registration if there are no orders

* when refunded, order status is updated to CANCEl in db

* added exceptions for refund

* format

* fixed bug with celery task when having several orders

* added search and filter in admin panel

* added 10 minutes to countdown task, so an user always will have the chance to pay

* refactored check payment function

* altered order payment check

* made test for vipps callback and checking if order status is successfull

* added check for status when fetching a payment order for a registration on an event

* made tests for updating and creating paid events

* Refactor event integration tests to use boolean truthiness

* Refactor payment serializers and views

* format

* format

* format

* fixed 500 error response and added vipps msn to env in docker

* Add payment expiration check and handling

* fixed bug with expired payment time

* removed write permission on Event for jubkom (#748)

* Update CHANGELOG.md (#749)

* merge

---------

Co-authored-by: Mads Nylund <[email protected]>
Co-authored-by: Martin Clementz <[email protected]>
Co-authored-by: Anders <[email protected]>
Co-authored-by: Ester2109 <[email protected]>
Co-authored-by: Harry Linrui XU <[email protected]>
Co-authored-by: haruixu <[email protected]>
Co-authored-by: norgor <[email protected]>
Co-authored-by: Harry Linrui Xu <[email protected]>
Co-authored-by: Tobias Rødahl Thingnes <[email protected]>
Co-authored-by: Jarand Romestrand <[email protected]>
Co-authored-by: Tini Tran <[email protected]>
Co-authored-by: JarandJR <[email protected]>

* Fix(event)/expired shows activities (#753)

* fixed issue expired events

* needs a fix

* fixed bugs

* format

* format

---------

Co-authored-by: Mads Nylund <[email protected]>
Co-authored-by: Martin Clementz <[email protected]>
Co-authored-by: Anders <[email protected]>
Co-authored-by: Mads Nylund <[email protected]>
Co-authored-by: Ester2109 <[email protected]>
Co-authored-by: Harry Linrui XU <[email protected]>
Co-authored-by: haruixu <[email protected]>
Co-authored-by: norgor <[email protected]>
Co-authored-by: Harry Linrui Xu <[email protected]>
Co-authored-by: Tobias Rødahl Thingnes <[email protected]>
Co-authored-by: Jarand Romestrand <[email protected]>
Co-authored-by: Tini Tran <[email protected]>
Co-authored-by: JarandJR <[email protected]>

---------

Co-authored-by: Mads Nylund <[email protected]>
Co-authored-by: Thomas H. Svendal <[email protected]>
Co-authored-by: Anders <[email protected]>
Co-authored-by: Ester2109 <[email protected]>
Co-authored-by: Harry Linrui XU <[email protected]>
Co-authored-by: haruixu <[email protected]>
Co-authored-by: norgor <[email protected]>
Co-authored-by: Harry Linrui Xu <[email protected]>
Co-authored-by: Tobias Rødahl Thingnes <[email protected]>
Co-authored-by: Jarand Romestrand <[email protected]>
Co-authored-by: Tini Tran <[email protected]>
Co-authored-by: JarandJR <[email protected]>
Co-authored-by: Mads Nylund <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants