We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fb75146 + da8a508 commit 84bc1b4Copy full SHA for 84bc1b4
docs/docs/07_sqlalchemy_many_to_many/03_many_to_many_relationships/README.md
@@ -275,4 +275,15 @@ class Tag(MethodView):
275
276
And with that, we're done!
277
278
+## Making sure Store ID matches when linking tags
279
+
280
+If you wanted to, you can make sure that you can only link a tag that belongs to a certain store, with an item of that same store.
281
282
+Something like this would work:
283
284
+```py
285
+if item.store.id != tag.store.id:
286
+ abort(400, message="Make sure item and tag belong to the same store before linking.")
287
+```
288
289
Now we're ready to look at securing API endpoints with user authentication.
0 commit comments