Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
internewshid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aptivate
client-projects
internewshid
Commits
541366b8
Commit
541366b8
authored
9 years ago
by
Martin Burchell
Browse files
Options
Downloads
Patches
Plain Diff
Updated comment to match method behaviour
parent
abac7743
No related branches found
No related tags found
1 merge request
!46
Tagging frontend
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
django/website/data_layer/models.py
+6
-6
6 additions, 6 deletions
django/website/data_layer/models.py
with
6 additions
and
6 deletions
django/website/data_layer/models.py
+
6
−
6
View file @
541366b8
...
...
@@ -24,13 +24,13 @@ class Message(DataLayerModel):
network_provider
=
models
.
CharField
(
max_length
=
200
,
blank
=
True
)
def
apply_terms
(
self
,
terms
):
"""
Add or replace value of term.taxonomy for current Item
"""
Add or replace value
s
of term.taxonomy for current Item
If the Item has no term in the taxonom
y
OR if the taxonomy.is_multiple just add it
.
IF the taxonmy is optional (categories)
If the Item has a term in that taxonomy already,
replace it
For taxonomies that support multiple terms eg tags, do not remove an
y
existing terms
.
IF the taxonomy is optional eg categories, and the Item has a term in
that taxonomy already,
replace it
"""
# It bugs me that so much of the logic applying to taxonomies is here.
# This should really be built out with an explicity through model
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment