Facilityuser has no facility

i tried to create my own form in my created app in kolibri, i am able to see the form but not able to post data through it. whenever i try to post data it give the error

RelatedObjectDoesNotExist: FacilityUser has no facility.
ERROR “POST /registered/ HTTP/1.1” 500 134232

Hi -

You can learn a bit more about the database models here: http://kolibri-dev.readthedocs.io/en/develop/architecture/uap/index.html

If you share a bit more about what you’re trying to do and post the code to github we’ll be able to give better feedback.

thanks!