Skip to content

Commit 9a49884

Browse files
committed
4.7.9
- there was an issue when saving environment configuration due to Django implementation of Path lib for settings.BASE_DIR
1 parent 6bfcb6d commit 9a49884

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

process/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
__title__ = 'django-process'
22
__description__ = 'An app for create process workflows and schedule tasks on django'
33
__url__ = 'https://github.com/Jesrat/django-process'
4-
__version__ = '4.7.8'
4+
__version__ = '4.7.9'
55
__author__ = 'Josue Gomez'
66
__author_email__ = 'jgomez@jesrat.com'
77
__license__ = 'Apache 2.0'

process/admin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def run_on_demand(self, request, queryset):
3434
class TaskAdmin(admin.ModelAdmin):
3535
form = TaskForm
3636
list_display = ('__str__', 'is_active', 'process')
37+
search_fields = ('name', 'description')
3738

3839
# noinspection PyMethodMayBeStatic,PyUnusedLocal
3940
def get_readonly_fields(self, request, obj=None):
@@ -104,9 +105,10 @@ class JobTaskAdmin(admin.ModelAdmin):
104105
list_filter = ('status',)
105106
list_display = ('__str__', 'dt_start', 'dt_end', 'observations')
106107

108+
# noinspection PyUnusedLocal
107109
def get_readonly_fields(self, request, obj=None):
108110
if obj:
109-
return self.readonly_fields + ('job', 'task', 'dt_start', 'dt_end', 'observations')
111+
return self.readonly_fields + ('pid', 'job', 'task', 'dt_start', 'dt_end', 'observations')
110112
return self.readonly_fields
111113

112114
def get_queryset(self, request):

process/management/commands/_actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def configure_env():
1818
mod_location = os.path.dirname(module.origin)
1919
env_file = os.path.join(mod_location, 'env_conf.json')
2020
environment = {
21-
'project_path': settings.BASE_DIR,
21+
'project_path': str(settings.BASE_DIR),
2222
'project_settings': os.environ.get('DJANGO_SETTINGS_MODULE')
2323
}
2424
try:

process/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ class JobTask(models.Model):
350350
related_name='logs'
351351
)
352352
status = models.CharField(_("status"), db_index=True, max_length=20, choices=status_choices, default=awaiting)
353-
pid = models.PositiveIntegerField(_("pid"), default=0)
353+
pid = models.PositiveIntegerField(_("pid"), default=0, db_index=True)
354354
dt_created = models.DateTimeField(_("created date"), blank=True, null=True, auto_now_add=True)
355355
dt_start = models.DateTimeField(_("start date"), blank=True, null=True)
356356
dt_end = models.DateTimeField(_("end date"), blank=True, null=True)

0 commit comments

Comments
 (0)