Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Create new guides section in docs

Anna Siwikefaf2b7c151a
diff --git a/docs/architecture.rst b/docs/architecture.rst
index 215ad4f395..571c08c088 100644
--- a/docs/architecture.rst
+++ b/docs/architecture.rst
@@ -11,6 +11,5 @@ Architecture
architecture/i18n
architecture/search
architecture/payments
- architecture/navigation
architecture/settings
architecture/page
diff --git a/docs/guides.rst b/docs/guides.rst
new file mode 100644
index 0000000000..ed6d3d5d54
--- /dev/null
+++ b/docs/guides.rst
@@ -0,0 +1,7 @@
+Guides
+======
+
+.. toctree::
+ :maxdepth: 1
+
+ guides/navigation
diff --git a/docs/architecture/navigation.rst b/docs/guides/navigation.rst
similarity index 100%
rename from docs/architecture/navigation.rst
rename to docs/guides/navigation.rst
diff --git a/docs/index.rst b/docs/index.rst
index 2b5de446b9..a643fe3240 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -14,6 +14,7 @@ Contents:
architecture
integrations
deployment
+ guides
Indices and tables
diff --git a/saleor/dashboard/forms.py b/saleor/dashboard/forms.py
index 064687f63d..2d8ce93ead 100644
--- a/saleor/dashboard/forms.py
+++ b/saleor/dashboard/forms.py
@@ -46,7 +46,7 @@ class AjaxSelect2ChoiceField(forms.ChoiceField):
def set_initial(self, obj, obj_id=None, label=None):
"""Set initially selected objects on field's widget."""
selected = {
- 'id': obj_id if obj else obj.pk,
+ 'id': obj_id if obj_id else obj.pk,
'text': label if label else str(obj)}
self.widget.attrs['data-initial'] = json.dumps(selected)