mirror of
https://github.com/OMGeeky/gpt-pilot.git
synced 2026-01-06 11:19:33 +01:00
TEMP FIX to make sure we don't select any files from the database that either are empty ('') or don't have any snapshot saved
This commit is contained in:
@@ -147,7 +147,17 @@ class Project:
|
||||
list: A list of coded files.
|
||||
"""
|
||||
files = File.select().where(File.app_id == self.args['app_id'])
|
||||
|
||||
# TODO temoprary fix to eliminate files that are not in the project
|
||||
files = [file for file in files if len(FileSnapshot.select().where(FileSnapshot.file_id == file.id)) > 0]
|
||||
# TODO END
|
||||
|
||||
files = self.get_files([file.path + '/' + file.name for file in files])
|
||||
|
||||
# TODO temoprary fix to eliminate files that are not in the project
|
||||
files = [file for file in files if file['content'] != '']
|
||||
# TODO END
|
||||
|
||||
return files
|
||||
|
||||
def get_files(self, files):
|
||||
|
||||
Reference in New Issue
Block a user