1
0

package fieldpoc and mitel-ommclient2

This commit is contained in:
Ember 'n0emis' Keske
2022-07-07 21:41:55 +02:00
parent 01560fbcad
commit 61b10153a9
6 changed files with 70 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
diff --git a/ywsd/objects.py b/ywsd/objects.py
index 4ce29fb..a535e76 100644
--- a/ywsd/objects.py
+++ b/ywsd/objects.py
@@ -178,7 +178,8 @@ class ActiveCall:
async def is_active_call(cls, username, x_eventphone_id, db_connection):
return (
await db_connection.scalar(
- cls.table.count()
+ sa.select(sa.func.count('*'))
+ .select_from(cls.table)
.where(cls.table.c.username == username)
.where(cls.table.c.x_eventphone_id == x_eventphone_id)
)

View File

@@ -0,0 +1,17 @@
{ lib, buildPythonApplication, hatchling, mitel-ommclient2, sqlalchemy, ywsd, diffsync }:
buildPythonApplication rec {
pname = "fieldpoc";
version = "0.11.0";
src = fetchGit {
url = "https://git.clerie.de/clerie/fieldpoc.git";
ref = "main";
rev = "c2ef36c5a7a31ea39f51c91c7ba76430f0aaa048";
};
format = "pyproject";
buildInputs = [ hatchling ];
propagatedBuildInputs = [ mitel-ommclient2 sqlalchemy ywsd diffsync ];
}