Survey_template is what you create from the UI, once you click on the start button a proper survey instance "should be" created.
So you don't want to find into your starting campaign contenttype = survey_template
The hereby code is definitely correct :
- Code: Select all
function Database:load_content_type()
sqlquery = "SELECt id FROM django_content_type WHERE model='survey'"
As well as this following code which check you are well running an existing survey :
- Code: Select all
content_type_id = self:load_content_type()
if tonumber(self.campaign_info.content_type_id) == tonumber(content_type_id) then
self.app_type = 'survey'
If you get a different value for campaign_info.content_type_id, then the problem is upstream, there is something that failed when clicking on the start button which should have changed the campaign_info.content_type_id from survey_template to survey.
Keep in mind Newfies have a survey template system, so a survey template can be reused but when a campaign starts an instance of this campaign is created from survey_template to survey
This is part of the big changes in V2, so I hope the above clarification helps.
Yours,
/Areski