[Answer]-Hi my custom validation is throwing a TypeError saying issubclass() arg 1 must be a class

1👍

Please see below code of admin.py

    from .forms import tbmstappraisalschedForm 
    class AppraisalScheduleAdmin(admin.ModelAdmin):
        exclude = ['intUpdatedBy']
    #    form = 'tbmstappraisalschedForm'  you can not pass a string  here .
         form = tbmstappraisalschedForm     #do like this

def save_model(self, request, obj, form, change): obj.intUpdatedBy = request.user.id obj.save()

Leave a comment