1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-18 08:16:07 +00:00

add index to UserStarredFile

This commit is contained in:
lins05
2013-03-30 20:38:14 +08:00
parent 5e45bb2724
commit ccd2605af1
2 changed files with 5 additions and 2 deletions

View File

@@ -688,7 +688,10 @@ def star_file(email, repo_id, path, is_dir, org_id=-1):
repo_id=repo_id,
path=path,
is_dir=is_dir)
f.save()
try:
f.save()
except IntegrityError, e:
logger.warn(e)
def unstar_file(email, repo_id, path):
# Should use "get", but here we use "filter" to fix the bug caused by no