mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
admin: fix regression in ClassicRecipe admin
Since we added the "packageconfig" to Recipe we need to exclude it from the admin or we see an error when we try to open ClassicRecipe in the admin site. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
51e83c8d31
commit
6d31e6ebf7
|
@ -113,7 +113,7 @@ class DynamicBuildDepAdmin(admin.ModelAdmin):
|
||||||
class ClassicRecipeAdmin(admin.ModelAdmin):
|
class ClassicRecipeAdmin(admin.ModelAdmin):
|
||||||
search_fields = ['filename', 'pn']
|
search_fields = ['filename', 'pn']
|
||||||
list_filter = ['layerbranch__layer__name', 'layerbranch__branch__name']
|
list_filter = ['layerbranch__layer__name', 'layerbranch__branch__name']
|
||||||
readonly_fields = [fieldname for fieldname in Recipe._meta.get_all_field_names() if fieldname != 'recipefiledependency']
|
readonly_fields = [fieldname for fieldname in Recipe._meta.get_all_field_names() if fieldname not in ['recipefiledependency', 'packageconfig']]
|
||||||
def has_add_permission(self, request, obj=None):
|
def has_add_permission(self, request, obj=None):
|
||||||
return False
|
return False
|
||||||
def has_delete_permission(self, request, obj=None):
|
def has_delete_permission(self, request, obj=None):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user