Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
221ca596
Commit
221ca596
authored
Apr 10, 2019
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CodeReuse/ActiveRecord violation
parent
ce0afba8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
ee/app/finders/geo/lfs_object_registry_finder.rb
ee/app/finders/geo/lfs_object_registry_finder.rb
+1
-3
ee/app/models/ee/lfs_object.rb
ee/app/models/ee/lfs_object.rb
+1
-0
No files found.
ee/app/finders/geo/lfs_object_registry_finder.rb
View file @
221ca596
...
...
@@ -94,15 +94,13 @@ module Geo
private
# rubocop: disable CodeReuse/ActiveRecord
def
all
if
selective_sync?
LfsObject
.
joins
(
:projects
).
where
(
projects:
{
id:
current_node
.
projects
}
)
LfsObject
.
project_id_in
(
current_node
.
projects
)
else
LfsObject
.
all
end
end
# rubocop: enable CodeReuse/ActiveRecord
def
find_synced
if
use_legacy_queries?
...
...
ee/app/models/ee/lfs_object.rb
View file @
221ca596
...
...
@@ -12,6 +12,7 @@ module EE
after_destroy
:log_geo_deleted_event
scope
:geo_syncable
,
->
{
with_files_stored_locally
}
scope
:project_id_in
,
->
(
ids
)
{
joins
(
:projects
).
merge
(
::
Project
.
id_in
(
ids
))
}
scope
:with_files_stored_remotely
,
->
{
where
(
file_store:
LfsObjectUploader
::
Store
::
REMOTE
)
}
end
...
...
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