Fix bug with blog post format type
This commit is contained in:
parent
9f33f45015
commit
1035fe287c
|
@ -134,8 +134,9 @@ def update():
|
||||||
g.info["post"] = post
|
g.info["post"] = post
|
||||||
|
|
||||||
# Copy fields.
|
# Copy fields.
|
||||||
for field in ["author", "fid", "subject", "format", "body", "avatar",
|
for field in ["author", "fid", "subject", "format", "format",
|
||||||
"categories", "privacy", "emoticons", "comments"]:
|
"body", "avatar", "categories", "privacy",
|
||||||
|
"emoticons", "comments"]:
|
||||||
g.info[field] = post[field]
|
g.info[field] = post[field]
|
||||||
|
|
||||||
# Dissect the time.
|
# Dissect the time.
|
||||||
|
@ -155,7 +156,7 @@ def update():
|
||||||
|
|
||||||
# Get all the fields from the posted params.
|
# Get all the fields from the posted params.
|
||||||
g.info["post_id"] = request.form.get("id")
|
g.info["post_id"] = request.form.get("id")
|
||||||
for field in ["fid", "subject", "body", "avatar", "categories", "privacy"]:
|
for field in ["fid", "subject", "format", "body", "avatar", "categories", "privacy"]:
|
||||||
g.info[field] = request.form.get(field)
|
g.info[field] = request.form.get(field)
|
||||||
for boolean in ["emoticons", "comments"]:
|
for boolean in ["emoticons", "comments"]:
|
||||||
g.info[boolean] = True if request.form.get(boolean, None) == "true" else False
|
g.info[boolean] = True if request.form.get(boolean, None) == "true" else False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user