fix: tabs_primary_active crashes with 'str has no attribute opts' on non-changeform views#1877
Open
laurentquillerou wants to merge 1 commit into
Open
Conversation
Contributor
|
Please create a ticket where you will describe how I can reproduce the issue. Right now, I have no clue what we are fixing. |
Author
|
In the app from django.db import models
class MyClass(models.Model):
name = models.CharField(max_length=64, primary_key=True, default=None)
ip = models.GenericIPAdressField(default=None, unique=true)
def __str__(self):
return self.nameand from django.contrib import admin
from django.contrib.auth.admin import GroupAdmin as BaseGroupAdmin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.models import Group, User
from app.models import MyClass
from unfold.admin import ModelAdmin
from unfold.forms import AdminPasswordChangeForm, UserChangeForm, UserCreationForm
admin.site.unregister(User)
admin.site.unregister(Group)
@admin.register(Server)
class MyClassAdmin(ModelAdmin):
passWhen going to admin panel, we ran into exception |
Contributor
|
This is not what I meant. Please create a new issue where you will fill all questions (this is important). I can tell you right now, that your repro example is not enough because I don't see there anything special what could cause this problem so please invest little bit more time into it. I'm not saying you are not right and the error is not there, I just don't see it yet. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
inline_admin_formsetsis not in the template context on changelist/custom pages, django resolves it as""It was introduced in 0.77.0