Merge branch 'stable'
This commit is contained in:
commit
d2fc47941c
|
@ -1,4 +1,4 @@
|
||||||
from .core.models import Role
|
from .core.models.role import Role
|
||||||
|
|
||||||
GUEST_PERMISSIONS = [
|
GUEST_PERMISSIONS = [
|
||||||
"view_schedule",
|
"view_schedule",
|
||||||
|
|
|
@ -69,7 +69,7 @@ class Show(models.Model):
|
||||||
auto_playlist_enabled = models.BooleanField(db_column="has_autoplaylist")
|
auto_playlist_enabled = models.BooleanField(db_column="has_autoplaylist")
|
||||||
auto_playlist_repeat = models.BooleanField(db_column="autoplaylist_repeat")
|
auto_playlist_repeat = models.BooleanField(db_column="autoplaylist_repeat")
|
||||||
|
|
||||||
hosts = models.ManyToManyField(
|
hosts = models.ManyToManyField( # type: ignore[var-annotated]
|
||||||
"core.User",
|
"core.User",
|
||||||
through="ShowHost",
|
through="ShowHost",
|
||||||
)
|
)
|
||||||
|
|
|
@ -10,6 +10,7 @@ django-settings-module = "libretime_api.settings.testing"
|
||||||
[tool.pylint.messages_control]
|
[tool.pylint.messages_control]
|
||||||
extension-pkg-whitelist = "pydantic"
|
extension-pkg-whitelist = "pydantic"
|
||||||
disable = [
|
disable = [
|
||||||
|
"duplicate-code",
|
||||||
"fixme",
|
"fixme",
|
||||||
"missing-class-docstring",
|
"missing-class-docstring",
|
||||||
"missing-function-docstring",
|
"missing-function-docstring",
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
# Please do not edit this file, edit the setup.py file!
|
# Please do not edit this file, edit the setup.py file!
|
||||||
# This file is auto-generated by tools/extract_requirements.py.
|
# This file is auto-generated by tools/extract_requirements.py.
|
||||||
django-cors-headers>=3.14.0,<4.4
|
django-cors-headers>=3.14.0,<4.4
|
||||||
django-filter>=2.4.0,<23.4
|
django-filter>=2.4.0,<23.6
|
||||||
django>=4.2.0,<4.3
|
django>=4.2.0,<4.3
|
||||||
djangorestframework>=3.14.0,<3.15
|
djangorestframework>=3.14.0,<3.15
|
||||||
drf-spectacular>=0.22.1,<0.27
|
drf-spectacular>=0.22.1,<0.28
|
||||||
gunicorn>=20.1.0,<21.3
|
gunicorn>=20.1.0,<21.3
|
||||||
psycopg[c]>=3.1.8,<3.2
|
psycopg[c]>=3.1.8,<3.2
|
||||||
requests>=2.31.0,<2.32
|
requests>=2.31.0,<2.32
|
||||||
uvicorn[standard]>=0.17.6,<0.24.0
|
uvicorn[standard]>=0.17.6,<0.25.0
|
||||||
|
|
|
@ -25,17 +25,17 @@ setup(
|
||||||
},
|
},
|
||||||
install_requires=[
|
install_requires=[
|
||||||
"django-cors-headers>=3.14.0,<4.4",
|
"django-cors-headers>=3.14.0,<4.4",
|
||||||
"django-filter>=2.4.0,<23.4",
|
"django-filter>=2.4.0,<23.6",
|
||||||
"django>=4.2.0,<4.3",
|
"django>=4.2.0,<4.3",
|
||||||
"djangorestframework>=3.14.0,<3.15",
|
"djangorestframework>=3.14.0,<3.15",
|
||||||
"drf-spectacular>=0.22.1,<0.27",
|
"drf-spectacular>=0.22.1,<0.28",
|
||||||
"requests>=2.31.0,<2.32",
|
"requests>=2.31.0,<2.32",
|
||||||
],
|
],
|
||||||
extras_require={
|
extras_require={
|
||||||
"prod": [
|
"prod": [
|
||||||
"gunicorn>=20.1.0,<21.3",
|
"gunicorn>=20.1.0,<21.3",
|
||||||
"psycopg[c]>=3.1.8,<3.2",
|
"psycopg[c]>=3.1.8,<3.2",
|
||||||
"uvicorn[standard]>=0.17.6,<0.24.0",
|
"uvicorn[standard]>=0.17.6,<0.25.0",
|
||||||
],
|
],
|
||||||
"dev": [
|
"dev": [
|
||||||
"django-coverage-plugin>=3.0.0,<4",
|
"django-coverage-plugin>=3.0.0,<4",
|
||||||
|
|
|
@ -63,8 +63,10 @@ class Application_Model_Preference
|
||||||
$paramMap = [];
|
$paramMap = [];
|
||||||
if ($result > 1) {
|
if ($result > 1) {
|
||||||
// this case should not happen.
|
// this case should not happen.
|
||||||
|
$caller = debug_backtrace()[1]['function'];
|
||||||
|
|
||||||
throw new Exception('Invalid number of results returned. Should be ' .
|
throw new Exception('Invalid number of results returned. Should be ' .
|
||||||
"0 or 1, but is '{$result}' instead");
|
"0 or 1, but is '{$result}' instead, caller={$caller}");
|
||||||
}
|
}
|
||||||
if ($result == 1) {
|
if ($result == 1) {
|
||||||
// result found
|
// result found
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.4",
|
"php": "^7.4",
|
||||||
"friendsofphp/php-cs-fixer": "<3.35.2"
|
"friendsofphp/php-cs-fixer": "<3.41.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,15 +8,11 @@ CPU_CORES := $(shell N=$$(nproc); echo $$(( $$N > 4 ? 4 : $$N )))
|
||||||
# BANDIT_ARG =
|
# BANDIT_ARG =
|
||||||
# PYTEST_ARG =
|
# PYTEST_ARG =
|
||||||
|
|
||||||
# SETUPTOOLS_ENABLE_FEATURES=legacy-editable is required to work
|
|
||||||
# around https://github.com/PyCQA/pylint/issues/7306
|
|
||||||
VENV = .venv
|
VENV = .venv
|
||||||
install: $(VENV)
|
install: $(VENV)
|
||||||
$(VENV):
|
$(VENV):
|
||||||
python3 -m venv $(VENV)
|
python3 -m venv $(VENV)
|
||||||
$(VENV)/bin/pip install --upgrade pip setuptools wheel
|
$(VENV)/bin/pip install --upgrade pip setuptools wheel
|
||||||
|
|
||||||
SETUPTOOLS_ENABLE_FEATURES=legacy-editable \
|
|
||||||
$(VENV)/bin/pip install \
|
$(VENV)/bin/pip install \
|
||||||
--requirement ../tools/python-requirements.txt \
|
--requirement ../tools/python-requirements.txt \
|
||||||
$(PIP_INSTALL)
|
$(PIP_INSTALL)
|
||||||
|
|
Loading…
Reference in New Issue