Move sql statement reset
In case the decomrpession call causes us to error, we leave a sql statement in a dirty state. Move the reset earlier so we don't leave a dirty statement.
This commit is contained in:
parent
fee8997e80
commit
fea953fdef
|
@ -5,7 +5,6 @@ local db = require("db")
|
|||
local queries = require("queries")
|
||||
local util = require("util")
|
||||
local pages = require("pages")
|
||||
local tags = require("tags")
|
||||
local session = require("session")
|
||||
local config = require("config")
|
||||
|
||||
|
@ -56,11 +55,11 @@ found, please report this error.
|
|||
end
|
||||
assert(err == sql.ROW)
|
||||
local data = stmnt_bio:get_values()
|
||||
stmnt_bio:reset()
|
||||
local bio_text = data[1]
|
||||
if data[1] ~= "" then
|
||||
bio_text = zlib.decompress(data[1])
|
||||
end
|
||||
stmnt_bio:reset()
|
||||
ret = pages.edit_bio{
|
||||
text = bio_text,
|
||||
user = author,
|
||||
|
|
Loading…
Reference in New Issue