Markdown message (half) support
This commit is contained in:
1 parent
e07f8ee05f
commit
eb9a1ad9e8
9 files changed
+147
-92
No files matched your search
+10
-1
@@ -31,7 +31,16 @@ async def init_database (data_directory):
|
||||
|
||||
# Checks whether an object is an instance of any database model
|
||||
def is_instance (value):
|
||||
isinstance(value, models.Model)
|
||||
import temporary as tmp
|
||||
if hasattr(value, 'id'):
|
||||
if tmp.is_tmp_id(value.id):
|
||||
return False
|
||||
|
||||
if isinstance(value, models.Model):
|
||||
return True
|
||||
|
||||
print("NOT A DB INSTANCE??? " + repr(value))
|
||||
return False
|
||||
|
||||
class User(models.Model):
|
||||
id = fields.IntField(pk=True)
|
||||
|
||||
Reference in new issue
Block a user