Open miguelcleon opened 7 years ago
@miguelcleon This was the similar problem that I encountered on this issue https://github.com/miguelcleon/ODM2-Admin/issues/98 When i comment out the parts of the code that creates the ajax fields it works fine. I will try to look into this further. Maybe Djano-ajax-selects have really updated their syntax. Thanks.
@miguelcleon I agree that fixing it is the best course of action, but let me know if you want me to add an old version (1.4.3
) to the channel while we figure this out.
@lsetiawan yes, #98 does appear to be the same problem, just on a different ajax select field.
@ocefpaf yes it would be good to have the old version for the moment. Then I can check if the other problem with the inline forms is still occuring. It doesn't seem to happen on my local development machine.
@lsetiawan so for some reason not all of the ajax select fields have the problem, for instance I can load the results change form fine (/odm2admin/results/16658/change/ for example with the LCZO database). This uses the AJAX_LOOKUP_CHANNELS
featureaction_lookup
I thought maybe using AutoCompleteSelectField
instead of make_ajax_field
was the difference but I tried changing it in one of the other forms and I still got the error.
@miguelcleon I commented out autoselect_fields_check_can_add(form, self.model, request.user)
in readonlyadmin.py and this seemed to fix the problem. Though I'm not quite sure of the consequences. Thanks.
@lsetiawan I can confirm that commenting out that line prevented the error. It might not be a problem if a readonly user still can't make any changes.
@ocefpaf yes it would be good to have the old version for the moment.
See #106
@lsetiawan I found one of potentially two problems from the Conda packaging @ocefpaf has been working on. The problem appears to be related to the read only group. The bug only appears after upgrading Django-ajax-selects to version 1.5.2 (the servers are using 1.4.3).
Can you try to reproduce this?