Open source web front-end for FreeSWITCH

Error creating extension with actions

Reported by Stas Shtin on 2010-12-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
WikiPBX
Medium
Dreamtime

Bug Description

When creating a new extension, I get a DB IntegrityError error after saving it. According to the error message, saved actions receive null value as extension ID.

Stas Shtin (stas.shtin) on 2010-12-04
Changed in wikipbx:
assignee: nobody → Dreamtime (dmm)
importance: Undecided → Medium
Dreamtime (dmm) wrote :

Please check that:
1. you have my last patch applied to the trunk tree
2. db scheme is up to date
3. standard actions templates were loaded

Few updates ago structure of Actions table was changed. And extension actions configuration now stored in a separate table. If you want to save your extension settings you should transfer data with:

   insert wikipbxweb_extensionaction (extension_id,action_id,`order`) select ac.extension_id,ac.id,`order` from wikipbxweb_action ac;

Please check that this is not the reason of this error.

Stas Shtin (stas.shtin) wrote :

I've merged from latest version of your branch and created a new DB to make sure it's not something caused by scheme changes before reporting this issue. Tested on SQLite&postgres

Action templates are loaded, as otherwise I wouldn't be able to create any actions at all.

I'm running django 1.2.3, tried downgrading to 1.2.0 which didn't make any difference.

Dreamtime (dmm) wrote :

I was able to reproduce this bug when I installed trunk version.
The problem introduced in revision 212:

wikipbx/wikipbxweb/forms.py
lines 272, 278.

In my tree these lines looks like:

def save(self, parent_object):
and
action = af.save()

If you remove "commit=False" you'll be able to create extension.

Stas Shtin (stas.shtin) wrote :

Thanks for helping out on this one. Not sure why I've changed this line code, my bad.

Changed in wikipbx:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers