Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
django-taggit
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
09649b88
authored
Dec 31, 2009
by
Alex Gaynor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct a bunch of test failures under MySQL. Refs #3.
parent
5d6a9964
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
taggit/managers.py
+1
-1
taggit/tests/tests.py
+1
-1
No files found.
taggit/managers.py
View file @
09649b88
...
...
@@ -59,7 +59,7 @@ class TaggableManager(object):
elif
all
(
isinstance
(
v
,
(
int
,
long
))
for
v
in
value
):
# This one is really ackward, just don't do it. The ORM does it
# for deletes, but no one else gets to.
qs
=
TaggedItem
.
objects
.
filter
(
pk__in
=
value
)
return
value
else
:
# Fucking flip-floppers.
raise
ValueError
(
"You can't combine Tag objects and strings. '
%
s' was provided."
%
value
)
...
...
taggit/tests/tests.py
View file @
09649b88
...
...
@@ -7,7 +7,7 @@ from taggit.tests.models import Food, Pet
class
BaseTaggingTest
(
TestCase
):
def
assert_tags_equal
(
self
,
qs
,
tags
):
self
.
assertEqual
(
map
(
lambda
tag
:
tag
.
name
,
qs
),
list
(
tags
))
self
.
assertEqual
(
sorted
(
map
(
lambda
tag
:
tag
.
name
,
qs
)),
sorted
(
list
(
tags
)
))
class
AddTagTestCase
(
BaseTaggingTest
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment