fixup!
This commit is contained in:
@@ -2,6 +2,8 @@ import random
|
||||
import string
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from lnbits.db import FromRowModel
|
||||
from lnbits.wallets import get_funding_source, set_funding_source
|
||||
|
||||
@@ -16,6 +18,19 @@ class DbTestModel(FromRowModel):
|
||||
value: Optional[str] = None
|
||||
|
||||
|
||||
class DbTestModelInner(BaseModel):
|
||||
id: int
|
||||
label: str
|
||||
description: Optional[str] = None
|
||||
|
||||
|
||||
class DbTestModel2(BaseModel):
|
||||
id: int
|
||||
name: str
|
||||
value: Optional[str] = None
|
||||
child: DbTestModelInner
|
||||
|
||||
|
||||
def get_random_string(iterations: int = 10):
|
||||
return "".join(
|
||||
random.SystemRandom().choice(string.ascii_uppercase + string.digits)
|
||||
|
||||
Reference in New Issue
Block a user