Unable to save groups or permissions on Django admin

I’m new to using Django and have been using AI tools to create a web application and it has been going really well, I created a user registration form to create user and assign them to groups from a dropdown, I was able to create users and it reflected in Django admin.
But a while later I noticed that the groups selected weren’t being reflected, so I tested trying to add groups through Django admin and that too was not working.
I also found out during this time that permissions weren’t also being saved, I was able to select permissions from the available list and port it to chosen permissions list but after selecting save and refreshing it was back to default with the chosen permission field being empty, same for groups.
Initially I was able to do it but now it seems to not work, I tried by creating new groups and new users through the admin interface and still no luck.

Welcome @ezrasc791 !

We would need to see all the code involved here to even begin to diagnose this. If you’ve created a custom user model, we’ll need to see that in addition to the forms and views involved with this. Additionally, if you’re using the Admin, we’ll need to see your ModelAdmin classes as well.