mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 12:18:45 -05:00
remove unused imports, variables and commented code
from tests
This commit is contained in:
@@ -208,7 +208,7 @@ class UserFileSerializer(serializers.ModelSerializer):
|
||||
|
||||
def get_preview_link(self, obj):
|
||||
try:
|
||||
img = Image.open(obj.file.file.file)
|
||||
Image.open(obj.file.file.file)
|
||||
return self.context['request'].build_absolute_uri(obj.file.url)
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
@@ -256,7 +256,7 @@ class UserFileViewSerializer(serializers.ModelSerializer):
|
||||
|
||||
def get_preview_link(self, obj):
|
||||
try:
|
||||
img = Image.open(obj.file.file.file)
|
||||
Image.open(obj.file.file.file)
|
||||
return self.context['request'].build_absolute_uri(obj.file.url)
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
Reference in New Issue
Block a user