Skip to content

Commit a2626bf

Browse files
committed
(DOCS-10079): Typo: Missing Comma
1 parent 90f598c commit a2626bf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

source/use-cases/storing-comments.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ structure like the following:
9595
_id: ObjectId(...),
9696
discussion_id: ObjectId(...),
9797
parent_id: ObjectId(...),
98-
slug: '34db/8bda'
98+
slug: '34db/8bda',
9999
full_slug: '2012.02.08.12.21.08:34db/2012.02.09.22.19.16:8bda',
100100
posted: ISODateTime(...),
101101
author: {
@@ -254,7 +254,8 @@ comments, you can select by the ``slug`` field:
254254

255255
comment = db.comments.find_one({
256256
'discussion_id': discussion_id,
257-
'slug': comment_slug})
257+
'slug': comment_slug
258+
})
258259

259260
You can retrieve a "sub-discussion," or a comment and all of its
260261
descendants recursively, by performing a regular expression prefix
@@ -266,7 +267,8 @@ query on the ``full_slug`` field:
266267

267268
subdiscussion = db.comments.find_one({
268269
'discussion_id': discussion_id,
269-
'full_slug': re.compile('^' + re.escape(parent_slug)) })
270+
'full_slug': re.compile('^' + re.escape(parent_slug))
271+
})
270272
subdiscussion = subdiscussion.sort('full_slug')
271273

272274
Indexing

0 commit comments

Comments
 (0)