auto-assign filter priority (max+10) on create
New filter rules no longer default to priority 100. Server picks max(priority)+10 per account when client sends priority=None (or 10 if the account has no rules yet), and the UI pre-fills the input with the next value instead of a fixed 100. Avoids ambiguous ordering when multiple rules end up with the same priority. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -41,7 +41,7 @@ class FilterActionResponse(FilterActionCreate):
|
||||
class FilterRuleCreate(BaseModel):
|
||||
name: str
|
||||
account_id: int
|
||||
priority: int = 100
|
||||
priority: int | None = None # None → automatisch ans Ende einsortieren (max+10)
|
||||
enabled: bool = True
|
||||
stop_processing: bool = False
|
||||
source_folder: str = "INBOX"
|
||||
|
||||
Reference in New Issue
Block a user