diff options
Diffstat (limited to 'app/services/files/update_service.rb')
-rw-r--r-- | app/services/files/update_service.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index a71fe61a4b6..462de06b6ff 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -18,6 +18,10 @@ module Files def validate super + if @file_content.empty? + raise_error("You must provide content.") + end + if file_has_changed? raise FileChangedError.new("You are attempting to update a file that has changed since you started editing it.") end |