Skip to content

Conversation

@onefloid
Copy link
Collaborator

@onefloid onefloid commented Apr 15, 2024

Determining whether a user is an admin based on the name is is simplified now

  • Access to the _user property instead of multiple accesses kwargs.get('user')
  • Use only one if statement with two conditions instead of multiple if statements
  • "Default" value None moved to the top
  • Removed method _determine_is_admin because the result was always overwritten afterwards
  • Less code

Tests were passed successfully

============================================================= test session starts =============================================================
platform win32 -- Python 3.11.7, pytest-8.1.1, pluggy-1.4.0
rootdir: D:\dev\tm1py_onefloid
configfile: pyproject.toml
plugins: anyio-4.2.0, xdist-3.5.0, time-machine-2.13.0     
...
========================================== 816 passed, 36 skipped, 198 warnings in 981.11s (0:16:21) ==========================================

@MariusWirtz MariusWirtz merged commit 3cf2907 into cubewise-code:master Apr 16, 2024
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