modify a little
This commit is contained in:
parent
e9c64de9d8
commit
53f0bbb4e4
|
@ -120,7 +120,7 @@ WSGI_APPLICATION = 'Codepedia2.wsgi.application'
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.mysql',
|
'ENGINE': 'django.db.backends.mysql',
|
||||||
'NAME': 'codepedia',
|
'NAME': 'codepedia_1',
|
||||||
'USER': 'root',
|
'USER': 'root',
|
||||||
'PASSWORD': 'codepedia123',
|
'PASSWORD': 'codepedia123',
|
||||||
'HOST': '127.0.0.1'
|
'HOST': '127.0.0.1'
|
||||||
|
|
|
@ -90,6 +90,9 @@ class ShowAnnotationView(View):
|
||||||
# user_ids = []
|
# user_ids = []
|
||||||
# 然后调用
|
# 然后调用
|
||||||
commit_id = self.get_current_commitid_by_fileid(file_id)
|
commit_id = self.get_current_commitid_by_fileid(file_id)
|
||||||
|
if users is None:
|
||||||
|
annotations = Annotation.objects.filter(file_id=file_id, linenum=line_num,user_id=user_id,is_latest=1,commit_id=commit_id)
|
||||||
|
else:
|
||||||
annotations = Annotation.objects.filter(file_id=file_id, linenum=line_num,user__in=users,is_latest=1,commit_id=commit_id)
|
annotations = Annotation.objects.filter(file_id=file_id, linenum=line_num,user__in=users,is_latest=1,commit_id=commit_id)
|
||||||
return annotations
|
return annotations
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue