aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/utility/monads.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wqflask/utility/monads.py b/wqflask/utility/monads.py
index 26225eaa..80ba42c8 100644
--- a/wqflask/utility/monads.py
+++ b/wqflask/utility/monads.py
@@ -124,7 +124,7 @@ class MonadicDictCursor(DictCursor):
... print(row)
"""
def fetchone(self):
- return MonadicDict(super().fetchone())
+ return Just(MonadicDict(row)) if (row := super().fetchone()) else Nothing
def fetchmany(self, size=None):
return [MonadicDict(row) for row in super().fetchmany(size=size)]
def fetchall(self):