mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix line length
This commit is contained in:
		| @@ -6,12 +6,11 @@ from ...mixins import Renderable | |||||||
|  |  | ||||||
|  |  | ||||||
| class Command(Renderable, BaseCommand): | class Command(Renderable, BaseCommand): | ||||||
|  |  | ||||||
|     help = """ |     help = """ | ||||||
|         Using the current set of correspondent rules, apply said rules to all |         Using the current set of correspondent rules, apply said rules to all | ||||||
|         documents in the database, effectively allowing you to back-tag all |         documents in the database, effectively allowing you to back-tag all | ||||||
|         previously indexed documents with correspondent created (or modified) after |         previously indexed documents with correspondent created (or modified) | ||||||
|         their initial import. |         after their initial import. | ||||||
|     """.replace("    ", "") |     """.replace("    ", "") | ||||||
|  |  | ||||||
|     def __init__(self, *args, **kwargs): |     def __init__(self, *args, **kwargs): | ||||||
| @@ -27,7 +26,8 @@ class Command(Renderable, BaseCommand): | |||||||
|             if document.correspondent: |             if document.correspondent: | ||||||
|                 continue |                 continue | ||||||
|  |  | ||||||
|             potential_correspondents = list(Correspondent.match_all(document.content)) |             potential_correspondents = list( | ||||||
|  |                 Correspondent.match_all(document.content)) | ||||||
|             if not potential_correspondents: |             if not potential_correspondents: | ||||||
|                 continue |                 continue | ||||||
|  |  | ||||||
| @@ -35,9 +35,11 @@ class Command(Renderable, BaseCommand): | |||||||
|  |  | ||||||
|             selected = potential_correspondents[0] |             selected = potential_correspondents[0] | ||||||
|             if potential_count > 1: |             if potential_count > 1: | ||||||
|                 message = "Detected {} potential correspondents for {}, so we've opted for {}" |                 message = "Detected {} potential correspondents for {}, " \ | ||||||
|  |                           "so we've opted for {}" | ||||||
|                 print(message.format(potential_count, document, selected)) |                 print(message.format(potential_count, document, selected)) | ||||||
|  |  | ||||||
|             print('Tagging {} with correspondent "{}"'.format(document, selected)) |             print('Tagging {} with correspondent "{}"'.format(document, | ||||||
|  |                                                               selected)) | ||||||
|             document.correspondent = selected |             document.correspondent = selected | ||||||
|             document.save(update_fields=("correspondent",)) |             document.save(update_fields=("correspondent",)) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Dashie
					Dashie