Skip to content

Commit

Permalink
add ignore save model error
Browse files Browse the repository at this point in the history
  • Loading branch information
magsyg committed Dec 31, 2023
1 parent 6c77d27 commit 848a3eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/root/utils/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def create(self, validated_data: dict) -> CustomBaseModel:
class CustomBaseAdmin(admin.ModelAdmin):
readonly_fields = ['version', 'created_by', 'created_at', 'updated_by', 'updated_at']

def save_model(self, request: HttpRequest, obj, form, change): # mypy: ignore-errors
def save_model(self, request: HttpRequest, obj, form, change): # type: ignore[no-untyped-def]
try:
if not change:
obj.created_by = request.user
Expand Down

0 comments on commit 848a3eb

Please sign in to comment.