fix edit
This commit is contained in:
parent
206e39c62d
commit
6061f2d754
1 changed files with 4 additions and 1 deletions
|
@ -67,7 +67,10 @@ class Changelog(db.Model):
|
||||||
# fixme remove
|
# fixme remove
|
||||||
c = cls()
|
c = cls()
|
||||||
c.created = datetime.utcnow()
|
c.created = datetime.utcnow()
|
||||||
|
if ts:
|
||||||
c.timestamp = datetime2ts(ts)
|
c.timestamp = datetime2ts(ts)
|
||||||
|
else:
|
||||||
|
c.timestamp = datetime2ts(c.created)
|
||||||
c.user_id = user.id
|
c.user_id = user.id
|
||||||
c.revision = cls.query.filter_by(user_id=user.id).count()
|
c.revision = cls.query.filter_by(user_id=user.id).count()
|
||||||
c.data = json.dumps([action] + list(args), ensure_ascii=False)
|
c.data = json.dumps([action] + list(args), ensure_ascii=False)
|
||||||
|
|
Loading…
Reference in a new issue