From e82ce89e9a1f61939182052bb71cf04a321f4d14 Mon Sep 17 00:00:00 2001 From: Tiago vasconcelos Date: Wed, 23 Feb 2022 13:32:23 +0000 Subject: [PATCH] change namedtuple to basemodel --- lnbits/extensions/tipjar/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lnbits/extensions/tipjar/models.py b/lnbits/extensions/tipjar/models.py index 0bfea50cd..92f25ab3a 100644 --- a/lnbits/extensions/tipjar/models.py +++ b/lnbits/extensions/tipjar/models.py @@ -1,5 +1,5 @@ from sqlite3 import Row -from typing import NamedTuple, Optional +from typing import Optional from fastapi.param_functions import Query from pydantic import BaseModel @@ -26,7 +26,7 @@ class createTip(BaseModel): message: str = "" -class Tip(NamedTuple): +class Tip(BaseModel): """A Tip represents a single donation""" id: str # This ID always corresponds to a satspay charge ID @@ -55,7 +55,7 @@ class createTips(BaseModel): message: str -class TipJar(NamedTuple): +class TipJar(BaseModel): """A TipJar represents a user's tip jar""" id: int