diff --git a/myproject/customers/templates/customers/customer_detail.html b/myproject/customers/templates/customers/customer_detail.html
index a755acf..8f4f1c0 100644
--- a/myproject/customers/templates/customers/customer_detail.html
+++ b/myproject/customers/templates/customers/customer_detail.html
@@ -292,20 +292,24 @@
{% endif %}
- {% if order.status == 'draft' %}
- Черновик
- {% elif order.status == 'pending' %}
- Ожидает
- {% elif order.status == 'in_production' %}
- В производстве
- {% elif order.status == 'ready' %}
- Готов
- {% elif order.status == 'delivered' %}
- Доставлен
- {% elif order.status == 'cancelled' %}
- Отменён
+ {% if order.status %}
+ {% if order.status.code == 'draft' %}
+ Черновик
+ {% elif order.status.code == 'pending' %}
+ Ожидает
+ {% elif order.status.code == 'in_production' %}
+ В производстве
+ {% elif order.status.code == 'ready' %}
+ Готов
+ {% elif order.status.code == 'delivered' %}
+ Доставлен
+ {% elif order.status.code == 'cancelled' %}
+ Отменён
+ {% else %}
+ {{ order.status.name }}
+ {% endif %}
{% else %}
- {{ order.get_status_display }}
+ Без статуса
{% endif %}
|
@@ -352,10 +356,10 @@
@@ -385,4 +389,23 @@
+
+
{% endblock %}
\ No newline at end of file
|