The group table's column is called "description" but we expose it in the API as "comment". Adjust internally used SQL to translate between them (this was already implemented and working for comment editing)
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
17716ef51a
commit
ad5d078193
|
@ -1626,7 +1626,7 @@ bool gravityDB_addToTable(const enum gravity_list_type listtype, tablerow *row,
|
|||
// The item is the item for all POST requests
|
||||
if(listtype == GRAVITY_GROUPS)
|
||||
{
|
||||
querystr = "INSERT INTO \"group\" (name,enabled,description) VALUES (:item,:enabled,:description);";
|
||||
querystr = "INSERT INTO \"group\" (name,enabled,description) VALUES (:item,:enabled,:comment);";
|
||||
}
|
||||
else if(listtype == GRAVITY_ADLISTS)
|
||||
{
|
||||
|
@ -1648,8 +1648,8 @@ bool gravityDB_addToTable(const enum gravity_list_type listtype, tablerow *row,
|
|||
if(row->name == NULL)
|
||||
{
|
||||
// Name is not to be changed
|
||||
querystr = "INSERT INTO \"group\" (name,enabled,description) VALUES (:item,:enabled,:description) "
|
||||
"ON CONFLICT(name) DO UPDATE SET enabled = :enabled, description = :description;";
|
||||
querystr = "INSERT INTO \"group\" (name,enabled,description) VALUES (:item,:enabled,:comment) "
|
||||
"ON CONFLICT(name) DO UPDATE SET enabled = :enabled, description = :comment;";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue