fix: B2B cards show created_at, not updated_at
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
updated_at was being triggered by views_count increment on every page view, making dates misleading. Reverted to created_at for display and sort. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
dc17352fe2
commit
8dcf4de146
@ -218,11 +218,10 @@ def index():
|
||||
latest_classifieds = []
|
||||
try:
|
||||
from database import Classified
|
||||
from sqlalchemy import func
|
||||
latest_classifieds = db.query(Classified).filter(
|
||||
Classified.is_active == True,
|
||||
Classified.is_test == False
|
||||
).order_by(func.coalesce(Classified.updated_at, Classified.created_at).desc()).limit(2).all()
|
||||
).order_by(Classified.created_at.desc()).limit(2).all()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
@ -1302,7 +1302,7 @@
|
||||
<span class="new-card-badge b2b">🏢 B2B {% if cl.listing_type == 'szukam' %}Szukam{% else %}Oferuję{% endif %}</span>
|
||||
<div class="new-card-title">{{ cl.title }}</div>
|
||||
<div class="new-card-meta">
|
||||
{{ cl.author.name if cl.author else 'Anonim' }} · {{ (cl.updated_at or cl.created_at)|local_time('%d.%m.%Y') }}
|
||||
{{ cl.author.name if cl.author else 'Anonim' }} · {{ cl.created_at|local_time('%d.%m.%Y') }}
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user