ciyidogan commited on
Commit
389233c
·
verified ·
1 Parent(s): a7390a0

Update admin_routes.py

Browse files
Files changed (1) hide show
  1. admin_routes.py +6 -1
admin_routes.py CHANGED
@@ -545,6 +545,8 @@ async def update_version(
545
  ):
546
  """Update version with race condition handling"""
547
  try:
 
 
548
  # Force parametresi kontrolü
549
  if force:
550
  log_warning(f"⚠️ Force update requested for version {version_no} by {username}")
@@ -559,7 +561,10 @@ async def update_version(
559
 
560
  log_info(f"✅ Version {version_no} updated by {username}")
561
  return result
562
-
 
 
 
563
  except RaceConditionError as e:
564
  if force:
565
  # Force modunda race condition'ı yoksay
 
545
  ):
546
  """Update version with race condition handling"""
547
  try:
548
+ log_debug(f"🔍 Version update request - project: {project_id}, version: {version_no}, user: {username}")
549
+
550
  # Force parametresi kontrolü
551
  if force:
552
  log_warning(f"⚠️ Force update requested for version {version_no} by {username}")
 
561
 
562
  log_info(f"✅ Version {version_no} updated by {username}")
563
  return result
564
+
565
+ except ValidationError as e:
566
+ log_error(f"❌ Validation error for version {version_no}: {str(e)}")
567
+ raise HTTPException(status_code=400, detail=str(e))
568
  except RaceConditionError as e:
569
  if force:
570
  # Force modunda race condition'ı yoksay