#238 breaks m_config:set_value/4 #244

kaos opened this Issue Oct 27, 2011 · 3 comments


None yet

3 participants

kaos commented Oct 27, 2011
=SUPERVISOR REPORT==== 27-Oct-2011::16:41:05 ===
     Supervisor: {<0.184.0>,z_site_sup}
     Context:    start_error
     Reason:     {'EXIT',{{case_clause,[]},
     Offender:   [{pid,undefined},

The case only expects a 0 or 1:

case z_db:q("update config set value = $1, modified = now() where module = $2 and key = $3", [Value, Module, Key], Context) of
    0 -> z_db:insert(config, [{module,Module}, {key, Key}, {value, Value}], Context);
    1 -> ok

but 0 is now always translated to []... so this could creep up in a lot of places, right?

I suggest improving the solution of issue #238.

arjan commented Oct 27, 2011

I agree. I really like that the update statement returns the nr. of rows affected...


I too.

Rollback of the last change and think of something new?

Any takers?

arjan commented Oct 28, 2011

Rolled back. See #247

@arjan arjan closed this Oct 28, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment