kopia lustrzana https://github.com/ihabunek/toot
				
				
				
			Fix last ID not saving when using --json
							rodzic
							
								
									eb175029a8
								
							
						
					
					
						commit
						54a111d669
					
				|  | @ -184,10 +184,11 @@ def post( | |||
|         poll_hide_totals=poll_hide_totals, | ||||
|     ) | ||||
| 
 | ||||
|     status = response.json() | ||||
| 
 | ||||
|     if json: | ||||
|         click.echo(response.text) | ||||
|     else: | ||||
|         status = response.json() | ||||
|         if "scheduled_at" in status: | ||||
|             scheduled_at = parse_datetime(status["scheduled_at"]) | ||||
|             scheduled_at = datetime.strftime(scheduled_at, "%Y-%m-%d %H:%M:%S%z") | ||||
|  | @ -195,7 +196,7 @@ def post( | |||
|         else: | ||||
|             click.echo(f"Toot posted: {status['url']}") | ||||
| 
 | ||||
|         save_last_post_id(app, user, status["id"]) | ||||
|     save_last_post_id(app, user, status["id"]) | ||||
| 
 | ||||
|     delete_tmp_status_file() | ||||
| 
 | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Ivan Habunek
						Ivan Habunek