| Commit message (Collapse) | Author | Lines |
|
https://github.com/python-discord/site/issues/273
This commit adds validation rules to the Infraction serializer that
validate if a given infraction should be accepted based on its status
of being considered `active`. If the validation fails, the API will
reject the request and return a 400 status.
Specifically, this validator checks that:
- infractions that can never be active do not have `active=True` set;
- a user can never receive a second active infraction of the same type.
Tests have been added to `test_infractions.py` to ensure that the
validators work as expected.
This commit implements the first part of #273
|
|
used in production anyway
|
|
They were not being excluded when flake8 was invoked via pre-commit.
|
|
|
|
This commit adds a link to the Contributing landing page to the
navbar on our website.
|
|
Currently, all toc-links will have a wiki-toc prefix. This commit
removes this prefix, so that we can header link with just something
like #environment instead of #wiki-toc-environment.
This addresses #276.
https://github.com/python-discord/site/issues/267
|
|
Previously, the create_superuser() command was called before
migrations had been completed on local setups, and this would
cause the command to crash, saying that the table did not exist.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
https://github.com/python-discord/site/issues/260
This commit adds validation steps to the InfractionSerializer to make
sure that `"warning"` infractions can never be set with `hidden=True`
and note infractions can never be set with `hidden=False` usng the
API. This is the final step in decoupling "note" infractions and
"warning" infractions.
This commit implements the final part of and closes #260
|