@@ -14,6 +14,11 @@ class Command(CompatibilityBaseCommand): |
||
14 | 14 |
|
15 | 15 |
for file in files: |
16 | 16 |
print(file) |
17 |
+ ext = file.split('.')[-1] |
|
18 |
+ if not ext: |
|
19 |
+ continue |
|
20 |
+ if ext.lower() not in ['jpg', 'jpeg', 'png']: |
|
21 |
+ continue |
|
17 | 22 |
try: |
18 | 23 |
file_path = 'media/file/{}'.format(file) |
19 | 24 |
if os.path.exists(file_path): |