Skip to content
Snippets Groups Projects
Commit b8317cc9 authored by Teemu Autto's avatar Teemu Autto
Browse files

Manually add index, as azure mongodb is not configured to autocreate index.

parent f98923c7
No related branches found
No related tags found
No related merge requests found
Pipeline #13374 passed
...@@ -28,6 +28,13 @@ class Item(db.Document): ...@@ -28,6 +28,13 @@ class Item(db.Document):
A model for items that are listed on the auction site. A model for items that are listed on the auction site.
""" """
# Create index for sorting items by closing date
meta = {"indexes": [
{"fields": [
"closes_at",
]}
]}
title = StringField(max_length=100, required=True) title = StringField(max_length=100, required=True)
description = StringField(max_length=2000, required=True) description = StringField(max_length=2000, required=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment