marton levente преди 9 месеца
родител
ревизия
287b8c8927
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      anafapi/anafspv.py

+ 1 - 1
anafapi/anafspv.py

@@ -91,7 +91,7 @@ class anafSPV(object):
         os.makedirs(os.path.join(self.DLLOC, cui), exist_ok=True)
         words = details.split()
         result_string = ' '.join(words[:3]) if len(words) >= 3 else ' '.join(words[:2]) if len(words) == 2 else details
-        with open(os.path.join(self.DLLOC, cui, result_string + '.pdf'), 'wb') as file:
+        with open(os.path.join(self.DLLOC, cui, '{}_{}_{}.pdf'.format(cui, result_string, id_)), 'wb') as file:
             file.write(response.content)
 
     def get_vector(self, cui):